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

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: 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 "chrome/browser/ui/zoom/zoom_controller.h"
10 #include "ui/views/controls/image_view.h"
11
12 namespace views {
13 class KeyEvent;
14 class MouseEvent;
15 }
16
17 // View for the zoom icon in the Omnibox.
18 class ZoomView : public views::ImageView {
19 public:
20 explicit ZoomView();
Ben Goodger (Google) 2012/06/04 15:16:49 -explicit
Kyle Horimoto 2012/06/05 05:03:59 Done.
21 virtual ~ZoomView();
22
23 void SetZoomIconState(ZoomController::ZoomIconState zoom_icon_state);
24 void SetZoomIconTooltipPercent(int zoom_percent);
25
26 private:
27 void Update();
28
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 };
Ben Goodger (Google) 2012/06/04 15:16:49 DISALLOW_COPY_AND
Kyle Horimoto 2012/06/05 05:03:59 Done.
43
44 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698