| 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_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 10 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // current WebContents as needed. | 22 // current WebContents as needed. |
| 23 explicit ZoomView(LocationBarView::Delegate* location_bar_delegate); | 23 explicit ZoomView(LocationBarView::Delegate* location_bar_delegate); |
| 24 virtual ~ZoomView(); | 24 virtual ~ZoomView(); |
| 25 | 25 |
| 26 // Updates the image and its tooltip appropriately, hiding or showing the icon | 26 // Updates the image and its tooltip appropriately, hiding or showing the icon |
| 27 // as needed. | 27 // as needed. |
| 28 void Update(ZoomController* zoom_controller); | 28 void Update(ZoomController* zoom_controller); |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 // views::ImageView: | 31 // views::ImageView: |
| 32 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 32 virtual void GetAccessibleState(ui::AXViewState* state) override; |
| 33 virtual bool GetTooltipText(const gfx::Point& p, | 33 virtual bool GetTooltipText(const gfx::Point& p, |
| 34 base::string16* tooltip) const OVERRIDE; | 34 base::string16* tooltip) const override; |
| 35 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 35 virtual bool OnMousePressed(const ui::MouseEvent& event) override; |
| 36 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 36 virtual void OnMouseReleased(const ui::MouseEvent& event) override; |
| 37 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 37 virtual bool OnKeyPressed(const ui::KeyEvent& event) override; |
| 38 | 38 |
| 39 // ui::EventHandler: | 39 // ui::EventHandler: |
| 40 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 40 virtual void OnGestureEvent(ui::GestureEvent* event) override; |
| 41 | 41 |
| 42 // Helper method to show and focus the zoom bubble associated with this | 42 // Helper method to show and focus the zoom bubble associated with this |
| 43 // widget. | 43 // widget. |
| 44 void ActivateBubble(); | 44 void ActivateBubble(); |
| 45 | 45 |
| 46 // The delegate used to get the currently visible WebContents. | 46 // The delegate used to get the currently visible WebContents. |
| 47 LocationBarView::Delegate* location_bar_delegate_; | 47 LocationBarView::Delegate* location_bar_delegate_; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(ZoomView); | 49 DISALLOW_COPY_AND_ASSIGN(ZoomView); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_ | 52 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_ |
| OLD | NEW |