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

Unified Diff: chrome/browser/ui/views/location_bar/chrome_to_mobile_view.h

Issue 9443007: Add Chrome To Mobile Service and Views Page Action. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bail on empty GetOAuth2LoginRefreshToken(). Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/location_bar/chrome_to_mobile_view.h
diff --git a/chrome/browser/ui/views/location_bar/chrome_to_mobile_view.h b/chrome/browser/ui/views/location_bar/chrome_to_mobile_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..56705682bbe3ea6bb944e2e5b9dfc3748a327e95
--- /dev/null
+++ b/chrome/browser/ui/views/location_bar/chrome_to_mobile_view.h
@@ -0,0 +1,48 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CHROME_TO_MOBILE_VIEW_H_
+#define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CHROME_TO_MOBILE_VIEW_H_
+#pragma once
+
+#include "chrome/browser/command_updater.h"
+#include "ui/views/controls/image_view.h"
+
+class LocationBarView;
+
+namespace views {
+class KeyEvent;
+class MouseEvent;
+}
+
+// A Page Action image view for the Chrome To Mobile bubble.
+class ChromeToMobileView : public views::ImageView,
+ public CommandUpdater::CommandObserver {
+ public:
+ ChromeToMobileView(LocationBarView* location_bar_view,
+ CommandUpdater* command_updater);
+ virtual ~ChromeToMobileView();
+
+ // CommandUpdater::CommandObserver overrides:
+ virtual void EnabledStateChangedForCommand(int id, bool enabled) OVERRIDE;
+
+ private:
+ // views::ImageView overrides:
+ virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
+ virtual bool GetTooltipText(const gfx::Point& p,
+ string16* tooltip) const OVERRIDE;
+ virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
+ virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
+ virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE;
+
+ // The LocationBarView hosting this view.
+ LocationBarView* location_bar_view_;
+
+ // The CommandUpdater for the Browser object that owns the location bar.
+ CommandUpdater* command_updater_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeToMobileView);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CHROME_TO_MOBILE_VIEW_H_
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/location_bar/chrome_to_mobile_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698