OLD | NEW |
---|---|
(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_CHROME_TO_MOBILE_VIEW_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CHROME_TO_MOBILE_VIEW_H_ | |
7 #pragma once | |
8 | |
9 #include "chrome/browser/command_updater.h" | |
10 #include "ui/views/controls/image_view.h" | |
11 | |
12 class LocationBarView; | |
13 | |
14 namespace views { | |
15 class KeyEvent; | |
16 class MouseEvent; | |
17 } | |
18 | |
19 // A Page Action image view for Chrome to Mobile functionality. | |
20 class ChromeToMobileView : public views::ImageView, | |
21 public CommandUpdater::CommandObserver { | |
22 public: | |
23 explicit ChromeToMobileView(LocationBarView* location_bar_view, | |
sky
2012/03/11 21:41:22
no explicit.
msw
2012/03/12 10:17:18
Done.
| |
24 CommandUpdater* command_updater); | |
25 virtual ~ChromeToMobileView(); | |
26 | |
27 // CommandUpdater::CommandObserver overrides: | |
28 virtual void EnabledStateChangedForCommand(int id, bool enabled) OVERRIDE; | |
29 | |
30 private: | |
31 // views::ImageView overrides: | |
32 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | |
33 virtual bool GetTooltipText(const gfx::Point& p, | |
34 string16* tooltip) const OVERRIDE; | |
35 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | |
36 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | |
37 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; | |
38 | |
39 // The LocationBarView hosting this view. | |
40 LocationBarView* location_bar_view_; | |
41 | |
42 // The CommandUpdater for the Browser object that owns the location bar. | |
43 CommandUpdater* command_updater_; | |
44 | |
45 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeToMobileView); | |
46 }; | |
47 | |
48 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CHROME_TO_MOBILE_VIEW_H_ | |
OLD | NEW |