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

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

Issue 10494004: Implements a zoom icon in the Omnibox for Views. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed messed up indentation Created 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "chrome/browser/ui/zoom/zoom_controller.h"
11 #include "ui/views/controls/image_view.h"
12
13 namespace views {
14 class KeyEvent;
15 class MouseEvent;
16 }
17
18 // View for the zoom icon in the Omnibox.
19 class ZoomView : public views::ImageView {
20 public:
21 ZoomView();
22 virtual ~ZoomView();
23
24 void SetZoomIconState(ZoomController::ZoomIconState zoom_icon_state);
25 void SetZoomIconTooltipPercent(int zoom_percent);
26
27 void Update();
Peter Kasting 2012/06/22 20:16:20 Nit: Add comments
Kyle Horimoto 2012/06/26 21:55:53 Done.
28 private:
Peter Kasting 2012/06/22 20:16:20 Nit: Add blank line above
Kyle Horimoto 2012/06/26 21:55:53 Done.
29 // views::ImageView overrides:
30 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
31 virtual bool GetTooltipText(const gfx::Point& p,
32 string16* tooltip) const OVERRIDE;
33 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
34 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
35 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE;
36
37 // The current icon state.
38 ZoomController::ZoomIconState zoom_icon_state_;
39
40 // The current zoom percentage.
41 int zoom_percent_;
42
43 DISALLOW_COPY_AND_ASSIGN(ZoomView);
44 };
45
46 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698