| 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_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 10 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 void SetExtensionInfo(const extensions::Extension* extension); | 94 void SetExtensionInfo(const extensions::Extension* extension); |
| 95 | 95 |
| 96 // Starts a timer which will close the bubble if |auto_close_| is true. | 96 // Starts a timer which will close the bubble if |auto_close_| is true. |
| 97 void StartTimerIfNecessary(); | 97 void StartTimerIfNecessary(); |
| 98 | 98 |
| 99 // Stops the auto-close timer. | 99 // Stops the auto-close timer. |
| 100 void StopTimer(); | 100 void StopTimer(); |
| 101 | 101 |
| 102 // extensions::IconImage::Observer overrides: | 102 // extensions::IconImage::Observer overrides: |
| 103 virtual void OnExtensionIconImageChanged( | 103 virtual void OnExtensionIconImageChanged( |
| 104 extensions::IconImage* /* image */) OVERRIDE; | 104 extensions::IconImage* /* image */) override; |
| 105 | 105 |
| 106 // views::View methods. | 106 // views::View methods. |
| 107 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; | 107 virtual void OnMouseEntered(const ui::MouseEvent& event) override; |
| 108 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; | 108 virtual void OnMouseExited(const ui::MouseEvent& event) override; |
| 109 | 109 |
| 110 // ui::EventHandler method. | 110 // ui::EventHandler method. |
| 111 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 111 virtual void OnGestureEvent(ui::GestureEvent* event) override; |
| 112 | 112 |
| 113 // views::ButtonListener method. | 113 // views::ButtonListener method. |
| 114 virtual void ButtonPressed(views::Button* sender, | 114 virtual void ButtonPressed(views::Button* sender, |
| 115 const ui::Event& event) OVERRIDE; | 115 const ui::Event& event) override; |
| 116 | 116 |
| 117 // views::BubbleDelegateView method. | 117 // views::BubbleDelegateView method. |
| 118 virtual void Init() OVERRIDE; | 118 virtual void Init() override; |
| 119 virtual void WindowClosing() OVERRIDE; | 119 virtual void WindowClosing() override; |
| 120 | 120 |
| 121 // content::NotificationObserver method. | 121 // content::NotificationObserver method. |
| 122 virtual void Observe(int type, | 122 virtual void Observe(int type, |
| 123 const content::NotificationSource& source, | 123 const content::NotificationSource& source, |
| 124 const content::NotificationDetails& details) OVERRIDE; | 124 const content::NotificationDetails& details) override; |
| 125 | 125 |
| 126 // ImmersiveModeController::Observer methods. | 126 // ImmersiveModeController::Observer methods. |
| 127 virtual void OnImmersiveRevealStarted() OVERRIDE; | 127 virtual void OnImmersiveRevealStarted() override; |
| 128 virtual void OnImmersiveModeControllerDestroyed() OVERRIDE; | 128 virtual void OnImmersiveModeControllerDestroyed() override; |
| 129 | 129 |
| 130 ZoomBubbleExtensionInfo extension_info_; | 130 ZoomBubbleExtensionInfo extension_info_; |
| 131 | 131 |
| 132 // Singleton instance of the zoom bubble. The zoom bubble can only be shown on | 132 // Singleton instance of the zoom bubble. The zoom bubble can only be shown on |
| 133 // the active browser window, so there is no case in which it will be shown | 133 // the active browser window, so there is no case in which it will be shown |
| 134 // twice at the same time. | 134 // twice at the same time. |
| 135 static ZoomBubbleView* zoom_bubble_; | 135 static ZoomBubbleView* zoom_bubble_; |
| 136 | 136 |
| 137 // Timer used to close the bubble when |auto_close_| is true. | 137 // Timer used to close the bubble when |auto_close_| is true. |
| 138 base::OneShotTimer<ZoomBubbleView> timer_; | 138 base::OneShotTimer<ZoomBubbleView> timer_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 156 // Not owned. | 156 // Not owned. |
| 157 ImmersiveModeController* immersive_mode_controller_; | 157 ImmersiveModeController* immersive_mode_controller_; |
| 158 | 158 |
| 159 // Used to register for fullscreen change notifications. | 159 // Used to register for fullscreen change notifications. |
| 160 content::NotificationRegistrar registrar_; | 160 content::NotificationRegistrar registrar_; |
| 161 | 161 |
| 162 DISALLOW_COPY_AND_ASSIGN(ZoomBubbleView); | 162 DISALLOW_COPY_AND_ASSIGN(ZoomBubbleView); |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ | 165 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ |
| OLD | NEW |