OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/panels/panel_browser_window.h" | 5 #include "chrome/browser/ui/panels/panel_browser_window.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_finder.h" | 9 #include "chrome/browser/ui/browser_finder.h" |
10 #include "chrome/browser/ui/panels/panel.h" | 10 #include "chrome/browser/ui/panels/panel.h" |
11 #include "chrome/browser/ui/panels/native_panel.h" | 11 #include "chrome/browser/ui/panels/native_panel.h" |
12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 12 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
13 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
14 #include "chrome/browser/ui/window_sizer.h" | 14 #include "chrome/browser/ui/window_sizer.h" |
15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
16 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/rect.h" |
17 | 17 |
18 #if defined(USE_AURA) | 18 #if defined(USE_AURA) |
19 #include "chrome/browser/ui/panels/panel_browser_view.h" | 19 #include "chrome/browser/ui/panels/panel_browser_view.h" |
20 #endif | 20 #endif |
21 | 21 |
22 using content::NativeWebKeyboardEvent; | 22 using content::NativeWebKeyboardEvent; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 panel_view->SetFocusToLocationBar(select_all); | 212 panel_view->SetFocusToLocationBar(select_all); |
213 #else | 213 #else |
214 // Panels do not have a location bar. | 214 // Panels do not have a location bar. |
215 #endif | 215 #endif |
216 } | 216 } |
217 | 217 |
218 void PanelBrowserWindow::UpdateReloadStopState(bool is_loading, bool force) { | 218 void PanelBrowserWindow::UpdateReloadStopState(bool is_loading, bool force) { |
219 // Panels don't have stop/reload indicator. | 219 // Panels don't have stop/reload indicator. |
220 } | 220 } |
221 | 221 |
222 void PanelBrowserWindow::UpdateToolbar(TabContentsWrapper* contents, | 222 void PanelBrowserWindow::UpdateToolbar(TabContents* contents, |
223 bool should_restore_state) { | 223 bool should_restore_state) { |
224 // Panels do not have a toolbar. | 224 // Panels do not have a toolbar. |
225 } | 225 } |
226 | 226 |
227 void PanelBrowserWindow::FocusToolbar() { | 227 void PanelBrowserWindow::FocusToolbar() { |
228 // Panels do not have a toolbar. | 228 // Panels do not have a toolbar. |
229 } | 229 } |
230 | 230 |
231 void PanelBrowserWindow::FocusAppMenu() { | 231 void PanelBrowserWindow::FocusAppMenu() { |
232 NOTIMPLEMENTED(); | 232 NOTIMPLEMENTED(); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 } | 357 } |
358 | 358 |
359 void PanelBrowserWindow::ShowPageInfo(Profile* profile, | 359 void PanelBrowserWindow::ShowPageInfo(Profile* profile, |
360 const GURL& url, | 360 const GURL& url, |
361 const SSLStatus& ssl, | 361 const SSLStatus& ssl, |
362 bool show_history) { | 362 bool show_history) { |
363 NOTIMPLEMENTED(); | 363 NOTIMPLEMENTED(); |
364 } | 364 } |
365 void PanelBrowserWindow::ShowWebsiteSettings( | 365 void PanelBrowserWindow::ShowWebsiteSettings( |
366 Profile* profile, | 366 Profile* profile, |
367 TabContentsWrapper* tab_contents_wrapper, | 367 TabContents* tab_contents, |
368 const GURL& url, | 368 const GURL& url, |
369 const content::SSLStatus& ssl, | 369 const content::SSLStatus& ssl, |
370 bool show_history) { | 370 bool show_history) { |
371 NOTIMPLEMENTED(); | 371 NOTIMPLEMENTED(); |
372 } | 372 } |
373 | 373 |
374 void PanelBrowserWindow::ShowAppMenu() { | 374 void PanelBrowserWindow::ShowAppMenu() { |
375 NOTIMPLEMENTED(); | 375 NOTIMPLEMENTED(); |
376 } | 376 } |
377 | 377 |
378 bool PanelBrowserWindow::PreHandleKeyboardEvent( | 378 bool PanelBrowserWindow::PreHandleKeyboardEvent( |
379 const content::NativeWebKeyboardEvent& event, | 379 const content::NativeWebKeyboardEvent& event, |
380 bool* is_keyboard_shortcut) { | 380 bool* is_keyboard_shortcut) { |
381 return native_panel_->PreHandlePanelKeyboardEvent(event, | 381 return native_panel_->PreHandlePanelKeyboardEvent(event, |
382 is_keyboard_shortcut); | 382 is_keyboard_shortcut); |
383 } | 383 } |
384 | 384 |
385 void PanelBrowserWindow::HandleKeyboardEvent( | 385 void PanelBrowserWindow::HandleKeyboardEvent( |
386 const content::NativeWebKeyboardEvent& event) { | 386 const content::NativeWebKeyboardEvent& event) { |
387 native_panel_->HandlePanelKeyboardEvent(event); | 387 native_panel_->HandlePanelKeyboardEvent(event); |
388 } | 388 } |
389 | 389 |
390 void PanelBrowserWindow::ShowCreateWebAppShortcutsDialog( | 390 void PanelBrowserWindow::ShowCreateWebAppShortcutsDialog( |
391 TabContentsWrapper* tab_contents) { | 391 TabContents* tab_contents) { |
392 NOTIMPLEMENTED(); | 392 NOTIMPLEMENTED(); |
393 } | 393 } |
394 | 394 |
395 void PanelBrowserWindow::ShowCreateChromeAppShortcutsDialog( | 395 void PanelBrowserWindow::ShowCreateChromeAppShortcutsDialog( |
396 Profile* profile, | 396 Profile* profile, |
397 const extensions::Extension* app) { | 397 const extensions::Extension* app) { |
398 NOTIMPLEMENTED(); | 398 NOTIMPLEMENTED(); |
399 } | 399 } |
400 | 400 |
401 void PanelBrowserWindow::Cut() { | 401 void PanelBrowserWindow::Cut() { |
(...skipping 22 matching lines...) Expand all Loading... |
424 void PanelBrowserWindow::ExitPresentationMode() { | 424 void PanelBrowserWindow::ExitPresentationMode() { |
425 NOTIMPLEMENTED(); | 425 NOTIMPLEMENTED(); |
426 } | 426 } |
427 | 427 |
428 bool PanelBrowserWindow::InPresentationMode() { | 428 bool PanelBrowserWindow::InPresentationMode() { |
429 NOTIMPLEMENTED(); | 429 NOTIMPLEMENTED(); |
430 return false; | 430 return false; |
431 } | 431 } |
432 #endif | 432 #endif |
433 | 433 |
434 void PanelBrowserWindow::ShowInstant(TabContentsWrapper* preview) { | 434 void PanelBrowserWindow::ShowInstant(TabContents* preview) { |
435 NOTIMPLEMENTED(); | 435 NOTIMPLEMENTED(); |
436 } | 436 } |
437 | 437 |
438 void PanelBrowserWindow::HideInstant() { | 438 void PanelBrowserWindow::HideInstant() { |
439 NOTIMPLEMENTED(); | 439 NOTIMPLEMENTED(); |
440 } | 440 } |
441 | 441 |
442 gfx::Rect PanelBrowserWindow::GetInstantBounds() { | 442 gfx::Rect PanelBrowserWindow::GetInstantBounds() { |
443 NOTIMPLEMENTED(); | 443 NOTIMPLEMENTED(); |
444 return gfx::Rect(); | 444 return gfx::Rect(); |
(...skipping 29 matching lines...) Expand all Loading... |
474 | 474 |
475 void PanelBrowserWindow::ShowAvatarBubbleFromAvatarButton() { | 475 void PanelBrowserWindow::ShowAvatarBubbleFromAvatarButton() { |
476 // Panels will never show an avatar button so this should never be called. | 476 // Panels will never show an avatar button so this should never be called. |
477 NOTREACHED(); | 477 NOTREACHED(); |
478 } | 478 } |
479 | 479 |
480 void PanelBrowserWindow::DestroyBrowser() { | 480 void PanelBrowserWindow::DestroyBrowser() { |
481 native_panel_->DestroyPanelBrowser(); | 481 native_panel_->DestroyPanelBrowser(); |
482 } | 482 } |
483 | 483 |
484 void PanelBrowserWindow::TabInsertedAt(TabContentsWrapper* contents, | 484 void PanelBrowserWindow::TabInsertedAt(TabContents* contents, |
485 int index, | 485 int index, |
486 bool foreground) { | 486 bool foreground) { |
487 if (panel_->auto_resizable()) { | 487 if (panel_->auto_resizable()) { |
488 DCHECK_EQ(0, index); | 488 DCHECK_EQ(0, index); |
489 panel_->EnableWebContentsAutoResize(contents->web_contents()); | 489 panel_->EnableWebContentsAutoResize(contents->web_contents()); |
490 } | 490 } |
491 } | 491 } |
OLD | NEW |