Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Side by Side Diff: chrome/browser/ui/views/location_bar/zoom_view.h

Issue 2019423005: Move //components/ui/zoom to top-level under //components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/ui/views/location_bar/bubble_icon_view.h" 9 #include "chrome/browser/ui/views/location_bar/bubble_icon_view.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"
11 11
12 namespace ui_zoom { 12 namespace zoom {
13 class ZoomController; 13 class ZoomController;
14 } 14 }
15 15
16 // View for the zoom icon in the Omnibox. 16 // View for the zoom icon in the Omnibox.
17 class ZoomView : public BubbleIconView { 17 class ZoomView : public BubbleIconView {
18 public: 18 public:
19 // Clicking on the ZoomView shows a ZoomBubbleView, which requires the current 19 // Clicking on the ZoomView shows a ZoomBubbleView, which requires the current
20 // WebContents. Because the current WebContents changes as the user switches 20 // WebContents. Because the current WebContents changes as the user switches
21 // tabs, a LocationBarView::Delegate is supplied to queried for the current 21 // tabs, a LocationBarView::Delegate is supplied to queried for the current
22 // WebContents when needed. 22 // WebContents when needed.
23 explicit ZoomView(LocationBarView::Delegate* location_bar_delegate); 23 explicit ZoomView(LocationBarView::Delegate* location_bar_delegate);
24 ~ZoomView() override; 24 ~ZoomView() override;
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(ui_zoom::ZoomController* zoom_controller); 28 void Update(zoom::ZoomController* zoom_controller);
29 29
30 protected: 30 protected:
31 // BubbleIconView: 31 // BubbleIconView:
32 void OnExecuting(BubbleIconView::ExecuteSource source) override; 32 void OnExecuting(BubbleIconView::ExecuteSource source) override;
33 void GetAccessibleState(ui::AXViewState* state) override; 33 void GetAccessibleState(ui::AXViewState* state) override;
34 views::BubbleDialogDelegateView* GetBubble() const override; 34 views::BubbleDialogDelegateView* GetBubble() const override;
35 gfx::VectorIconId GetVectorIcon() const override; 35 gfx::VectorIconId GetVectorIcon() const override;
36 36
37 private: 37 private:
38 // The delegate used to get the currently visible WebContents. 38 // The delegate used to get the currently visible WebContents.
39 LocationBarView::Delegate* location_bar_delegate_; 39 LocationBarView::Delegate* location_bar_delegate_;
40 40
41 gfx::VectorIconId image_id_; 41 gfx::VectorIconId image_id_;
42 42
43 DISALLOW_COPY_AND_ASSIGN(ZoomView); 43 DISALLOW_COPY_AND_ASSIGN(ZoomView);
44 }; 44 };
45 45
46 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_ 46 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/zoom_bubble_view.cc ('k') | chrome/browser/ui/views/location_bar/zoom_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698