| 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 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/browser/ui/views/frame/browser_frame.h" | 21 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| 22 #include "chrome/browser/ui/views/frame/contents_web_view.h" | 22 #include "chrome/browser/ui/views/frame/contents_web_view.h" |
| 23 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 23 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
| 24 #include "chrome/browser/ui/views/frame/scroll_end_effect_controller.h" | 24 #include "chrome/browser/ui/views/frame/scroll_end_effect_controller.h" |
| 25 #include "chrome/browser/ui/views/frame/web_contents_close_handler.h" | 25 #include "chrome/browser/ui/views/frame/web_contents_close_handler.h" |
| 26 #include "chrome/browser/ui/views/load_complete_listener.h" | 26 #include "chrome/browser/ui/views/load_complete_listener.h" |
| 27 #include "components/infobars/core/infobar_container.h" | 27 #include "components/infobars/core/infobar_container.h" |
| 28 #include "ui/base/accelerators/accelerator.h" | 28 #include "ui/base/accelerators/accelerator.h" |
| 29 #include "ui/base/models/simple_menu_model.h" | 29 #include "ui/base/models/simple_menu_model.h" |
| 30 #include "ui/gfx/native_widget_types.h" | 30 #include "ui/gfx/native_widget_types.h" |
| 31 #include "ui/gfx/sys_color_change_listener.h" | |
| 32 #include "ui/views/controls/button/button.h" | 31 #include "ui/views/controls/button/button.h" |
| 33 #include "ui/views/controls/webview/unhandled_keyboard_event_handler.h" | 32 #include "ui/views/controls/webview/unhandled_keyboard_event_handler.h" |
| 34 #include "ui/views/widget/widget_delegate.h" | 33 #include "ui/views/widget/widget_delegate.h" |
| 35 #include "ui/views/widget/widget_observer.h" | 34 #include "ui/views/widget/widget_observer.h" |
| 36 #include "ui/views/window/client_view.h" | 35 #include "ui/views/window/client_view.h" |
| 37 | 36 |
| 38 #if defined(OS_WIN) | 37 #if defined(OS_WIN) |
| 39 #include "chrome/browser/hang_monitor/hung_plugin_action.h" | 38 #include "chrome/browser/hang_monitor/hung_plugin_action.h" |
| 40 #include "chrome/browser/hang_monitor/hung_window_detector.h" | 39 #include "chrome/browser/hang_monitor/hung_window_detector.h" |
| 41 #endif | 40 #endif |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // including the TabStrip, toolbars, download shelves, the content area etc. | 88 // including the TabStrip, toolbars, download shelves, the content area etc. |
| 90 // | 89 // |
| 91 class BrowserView : public BrowserWindow, | 90 class BrowserView : public BrowserWindow, |
| 92 public BrowserWindowTesting, | 91 public BrowserWindowTesting, |
| 93 public TabStripModelObserver, | 92 public TabStripModelObserver, |
| 94 public ui::AcceleratorProvider, | 93 public ui::AcceleratorProvider, |
| 95 public views::WidgetDelegate, | 94 public views::WidgetDelegate, |
| 96 public views::WidgetObserver, | 95 public views::WidgetObserver, |
| 97 public views::ClientView, | 96 public views::ClientView, |
| 98 public infobars::InfoBarContainer::Delegate, | 97 public infobars::InfoBarContainer::Delegate, |
| 99 public gfx::SysColorChangeListener, | |
| 100 public LoadCompleteListener::Delegate, | 98 public LoadCompleteListener::Delegate, |
| 101 public OmniboxPopupModelObserver { | 99 public OmniboxPopupModelObserver { |
| 102 public: | 100 public: |
| 103 // The browser view's class name. | 101 // The browser view's class name. |
| 104 static const char kViewClassName[]; | 102 static const char kViewClassName[]; |
| 105 | 103 |
| 106 BrowserView(); | 104 BrowserView(); |
| 107 virtual ~BrowserView(); | 105 virtual ~BrowserView(); |
| 108 | 106 |
| 109 // Takes ownership of |browser|. | 107 // Takes ownership of |browser|. |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 // Overridden from views::ClientView: | 446 // Overridden from views::ClientView: |
| 449 virtual bool CanClose() OVERRIDE; | 447 virtual bool CanClose() OVERRIDE; |
| 450 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | 448 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; |
| 451 virtual gfx::Size GetMinimumSize() OVERRIDE; | 449 virtual gfx::Size GetMinimumSize() OVERRIDE; |
| 452 | 450 |
| 453 // InfoBarContainer::Delegate overrides | 451 // InfoBarContainer::Delegate overrides |
| 454 virtual SkColor GetInfoBarSeparatorColor() const OVERRIDE; | 452 virtual SkColor GetInfoBarSeparatorColor() const OVERRIDE; |
| 455 virtual void InfoBarContainerStateChanged(bool is_animating) OVERRIDE; | 453 virtual void InfoBarContainerStateChanged(bool is_animating) OVERRIDE; |
| 456 virtual bool DrawInfoBarArrows(int* x) const OVERRIDE; | 454 virtual bool DrawInfoBarArrows(int* x) const OVERRIDE; |
| 457 | 455 |
| 458 // gfx::SysColorChangeListener overrides: | |
| 459 virtual void OnSysColorChange() OVERRIDE; | |
| 460 | |
| 461 // Overridden from views::View: | 456 // Overridden from views::View: |
| 462 virtual const char* GetClassName() const OVERRIDE; | 457 virtual const char* GetClassName() const OVERRIDE; |
| 463 virtual void Layout() OVERRIDE; | 458 virtual void Layout() OVERRIDE; |
| 464 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 459 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; |
| 465 virtual void ViewHierarchyChanged( | 460 virtual void ViewHierarchyChanged( |
| 466 const ViewHierarchyChangedDetails& details) OVERRIDE; | 461 const ViewHierarchyChangedDetails& details) OVERRIDE; |
| 467 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; | 462 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; |
| 468 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 463 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
| 464 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; |
| 469 | 465 |
| 470 // Overridden from ui::AcceleratorTarget: | 466 // Overridden from ui::AcceleratorTarget: |
| 471 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 467 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
| 472 | 468 |
| 473 // OmniboxPopupModelObserver overrides | 469 // OmniboxPopupModelObserver overrides |
| 474 virtual void OnOmniboxPopupShownOrHidden() OVERRIDE; | 470 virtual void OnOmniboxPopupShownOrHidden() OVERRIDE; |
| 475 | 471 |
| 476 // Testing interface: | 472 // Testing interface: |
| 477 views::View* GetContentsContainerForTest() { return contents_container_; } | 473 views::View* GetContentsContainerForTest() { return contents_container_; } |
| 478 views::WebView* GetContentsWebViewForTest() { return contents_web_view_; } | 474 views::WebView* GetContentsWebViewForTest() { return contents_web_view_; } |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 base::TimeTicks last_animation_time_; | 732 base::TimeTicks last_animation_time_; |
| 737 | 733 |
| 738 // If this flag is set then SetFocusToLocationBar() will set focus to the | 734 // If this flag is set then SetFocusToLocationBar() will set focus to the |
| 739 // location bar even if the browser window is not active. | 735 // location bar even if the browser window is not active. |
| 740 bool force_location_bar_focus_; | 736 bool force_location_bar_focus_; |
| 741 | 737 |
| 742 scoped_ptr<ImmersiveModeController> immersive_mode_controller_; | 738 scoped_ptr<ImmersiveModeController> immersive_mode_controller_; |
| 743 | 739 |
| 744 scoped_ptr<ScrollEndEffectController> scroll_end_effect_controller_; | 740 scoped_ptr<ScrollEndEffectController> scroll_end_effect_controller_; |
| 745 | 741 |
| 746 gfx::ScopedSysColorChangeListener color_change_listener_; | |
| 747 | |
| 748 scoped_ptr<WebContentsCloseHandler> web_contents_close_handler_; | 742 scoped_ptr<WebContentsCloseHandler> web_contents_close_handler_; |
| 749 | 743 |
| 750 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; | 744 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; |
| 751 | 745 |
| 752 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 746 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
| 753 }; | 747 }; |
| 754 | 748 |
| 755 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 749 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
| OLD | NEW |