1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "chrome/browser/ui/panels/panel.h" 6 7 #include "base/logging.h" 8 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/panels/panel_manager.h" 10 #include "ui/gfx/rect.h" 11 12 Panel::Panel(Browser* browser, const gfx::Rect& bounds) 13 : bounds_(bounds), 14 minimized_(false) { 15 browser_window_.reset(CreateNativePanel(browser, this)); 16 } 17 18 Panel::~Panel() { 19 Close(); 20 } 21 22 PanelManager* Panel::manager() const { 23 return PanelManager::GetInstance(); 24 } 25 26 void Panel::Minimize() { 27 NOTIMPLEMENTED(); 28 } 29 30 void Panel::Restore() { 31 NOTIMPLEMENTED(); 32 } 33 34 void Panel::Show() { 35 browser_window_->Show(); 36 } 37 38 void Panel::ShowInactive() { 39 NOTIMPLEMENTED(); 40 } 41 42 void Panel::SetBounds(const gfx::Rect& bounds) { 43 NOTIMPLEMENTED(); 44 } 45 46 void Panel::Close() { 47 if (!browser_window_.get()) 48 return; 49 browser_window_->Close(); 50 manager()->Remove(this); 51 } 52 53 void Panel::Activate() { 54 NOTIMPLEMENTED(); 55 } 56 57 void Panel::Deactivate() { 58 NOTIMPLEMENTED(); 59 } 60 61 bool Panel::IsActive() const { 62 NOTIMPLEMENTED(); 63 return false; 64 } 65 66 void Panel::FlashFrame() { 67 NOTIMPLEMENTED(); 68 } 69 70 gfx::NativeWindow Panel::GetNativeHandle() { 71 return browser_window_->GetNativeHandle(); 72 } 73 74 BrowserWindowTesting* Panel::GetBrowserWindowTesting() { 75 NOTIMPLEMENTED(); 76 return NULL; 77 } 78 79 StatusBubble* Panel::GetStatusBubble() { 80 NOTIMPLEMENTED(); 81 return NULL; 82 } 83 84 void Panel::ToolbarSizeChanged(bool is_animating){ 85 NOTIMPLEMENTED(); 86 } 87 88 void Panel::UpdateTitleBar() { 89 NOTIMPLEMENTED(); 90 } 91 92 void Panel::ShelfVisibilityChanged() { 93 NOTIMPLEMENTED(); 94 } 95 96 void Panel::UpdateDevTools() { 97 NOTIMPLEMENTED(); 98 } 99 100 void Panel::UpdateLoadingAnimations(bool should_animate) { 101 NOTIMPLEMENTED(); 102 } 103 104 void Panel::SetStarredState(bool is_starred) { 105 NOTIMPLEMENTED(); 106 } 107 108 gfx::Rect Panel::GetRestoredBounds() const { 109 NOTIMPLEMENTED(); 110 return gfx::Rect(); 111 } 112 113 gfx::Rect Panel::GetBounds() const { 114 NOTIMPLEMENTED(); 115 return gfx::Rect(); 116 } 117 118 bool Panel::IsMaximized() const { 119 NOTIMPLEMENTED(); 120 return false; 121 } 122 123 void Panel::SetFullscreen(bool fullscreen) { 124 NOTIMPLEMENTED(); 125 } 126 127 bool Panel::IsFullscreen() const { 128 NOTIMPLEMENTED(); 129 return false; 130 } 131 132 bool Panel::IsFullscreenBubbleVisible() const { 133 NOTIMPLEMENTED(); 134 return false; 135 } 136 137 LocationBar* Panel::GetLocationBar() const { 138 NOTIMPLEMENTED(); 139 return NULL; 140 } 141 142 void Panel::SetFocusToLocationBar(bool select_all) { 143 NOTIMPLEMENTED(); 144 } 145 146 void Panel::UpdateReloadStopState(bool is_loading, bool force) { 147 NOTIMPLEMENTED(); 148 } 149 150 void Panel::UpdateToolbar(TabContentsWrapper* contents, 151 bool should_restore_state) { 152 NOTIMPLEMENTED(); 153 } 154 155 void Panel::FocusToolbar() { 156 NOTIMPLEMENTED(); 157 } 158 159 void Panel::FocusAppMenu() { 160 NOTIMPLEMENTED(); 161 } 162 163 void Panel::FocusBookmarksToolbar() { 164 NOTIMPLEMENTED(); 165 } 166 167 void Panel::FocusChromeOSStatus() { 168 NOTIMPLEMENTED(); 169 } 170 171 void Panel::RotatePaneFocus(bool forwards) { 172 NOTIMPLEMENTED(); 173 } 174 175 bool Panel::IsBookmarkBarVisible() const { 176 return false; 177 } 178 179 bool Panel::IsBookmarkBarAnimating() const { 180 return false; 181 } 182 183 bool Panel::IsTabStripEditable() const { 184 return false; 185 } 186 187 bool Panel::IsToolbarVisible() const { 188 NOTIMPLEMENTED(); 189 return false; 190 } 191 192 void Panel::DisableInactiveFrame() { 193 NOTIMPLEMENTED(); 194 } 195 196 void Panel::ConfirmSetDefaultSearchProvider( 197 TabContents* tab_contents, 198 TemplateURL* template_url, 199 TemplateURLModel* template_url_model) { 200 NOTIMPLEMENTED(); 201 } 202 203 void Panel::ConfirmAddSearchProvider(const TemplateURL* template_url, 204 Profile* profile) { 205 NOTIMPLEMENTED(); 206 } 207 208 void Panel::ToggleBookmarkBar() { 209 NOTIMPLEMENTED(); 210 } 211 212 void Panel::ShowAboutChromeDialog() { 213 NOTIMPLEMENTED(); 214 } 215 216 void Panel::ShowUpdateChromeDialog() { 217 NOTIMPLEMENTED(); 218 } 219 220 void Panel::ShowTaskManager() { 221 NOTIMPLEMENTED(); 222 } 223 224 void Panel::ShowBackgroundPages() { 225 NOTIMPLEMENTED(); 226 } 227 228 void Panel::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { 229 NOTIMPLEMENTED(); 230 } 231 232 bool Panel::IsDownloadShelfVisible() const { 233 NOTIMPLEMENTED(); 234 return false; 235 } 236 237 DownloadShelf* Panel::GetDownloadShelf() { 238 NOTIMPLEMENTED(); 239 return NULL; 240 } 241 242 void Panel::ShowRepostFormWarningDialog(TabContents* tab_contents) { 243 NOTIMPLEMENTED(); 244 } 245 246 void Panel::ShowCollectedCookiesDialog(TabContents* tab_contents) { 247 NOTIMPLEMENTED(); 248 } 249 250 void Panel::ShowThemeInstallBubble() { 251 NOTIMPLEMENTED(); 252 } 253 254 void Panel::ConfirmBrowserCloseWithPendingDownloads() { 255 NOTIMPLEMENTED(); 256 } 257 258 void Panel::ShowHTMLDialog(HtmlDialogUIDelegate* delegate, 259 gfx::NativeWindow parent_window) { 260 NOTIMPLEMENTED(); 261 } 262 263 void Panel::UserChangedTheme() { 264 NOTIMPLEMENTED(); 265 } 266 267 int Panel::GetExtraRenderViewHeight() const { 268 NOTIMPLEMENTED(); 269 return -1; 270 } 271 272 void Panel::TabContentsFocused(TabContents* tab_contents) { 273 NOTIMPLEMENTED(); 274 } 275 276 void Panel::ShowPageInfo(Profile* profile, 277 const GURL& url, 278 const NavigationEntry::SSLStatus& ssl, 279 bool show_history) { 280 NOTIMPLEMENTED(); 281 } 282 283 void Panel::ShowAppMenu() { 284 NOTIMPLEMENTED(); 285 } 286 287 bool Panel::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, 288 bool* is_keyboard_shortcut) { 289 NOTIMPLEMENTED(); 290 return false; 291 } 292 293 void Panel::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { 294 NOTIMPLEMENTED(); 295 } 296 297 void Panel::ShowCreateWebAppShortcutsDialog(TabContentsWrapper* tab_contents) { 298 NOTIMPLEMENTED(); 299 } 300 301 void Panel::ShowCreateChromeAppShortcutsDialog(Profile* profile, 302 const Extension* app) { 303 NOTIMPLEMENTED(); 304 } 305 306 void Panel::Cut() { 307 NOTIMPLEMENTED(); 308 } 309 310 void Panel::Copy() { 311 NOTIMPLEMENTED(); 312 } 313 314 void Panel::Paste() { 315 NOTIMPLEMENTED(); 316 } 317 318 void Panel::ToggleTabStripMode() { 319 NOTIMPLEMENTED(); 320 } 321 322 #if defined(OS_MACOSX) 323 void Panel::OpenTabpose() { 324 NOTIMPLEMENTED(); 325 } 326 #endif 327 328 void Panel::PrepareForInstant() { 329 NOTIMPLEMENTED(); 330 } 331 332 void Panel::ShowInstant(TabContentsWrapper* preview) { 333 NOTIMPLEMENTED(); 334 } 335 336 void Panel::HideInstant(bool instant_is_active) { 337 NOTIMPLEMENTED(); 338 } 339 340 gfx::Rect Panel::GetInstantBounds() { 341 NOTIMPLEMENTED(); 342 return gfx::Rect(); 343 } 344 345 #if defined(OS_CHROMEOS) 346 void Panel::ShowKeyboardOverlay(gfx::NativeWindow owning_window) { 347 NOTIMPLEMENTED(); 348 } 349 #endif 350 351 void Panel::DestroyBrowser() { 352 NOTIMPLEMENTED(); 353 } 354