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

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

Issue 10917280: Fix up views web intents location bar decoration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add font info to constructor Created 8 years, 3 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 | Annotate | Revision Log
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_WEB_INTENTS_BUTTON_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_WEB_INTENTS_BUTTON_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_WEB_INTENTS_BUTTON_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_WEB_INTENTS_BUTTON_VIEW_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "chrome/browser/ui/views/location_bar/location_bar_decoration_view.h" 10 #include "chrome/browser/ui/views/location_bar/location_bar_decoration_view.h"
11 11
12 class TabContents; 12 class TabContents;
13 13
14 // Display the use-another-service button for web intents service pages 14 // Display the use-another-service button for web intents service pages
15 // displayed in a tab. 15 // displayed in a tab.
16 class WebIntentsButtonView : public LocationBarDecorationView { 16 class WebIntentsButtonView : public LocationBarDecorationView {
17 public: 17 public:
18 // |parent| and |background_images| passed to superclass. They are a weak ptr 18 // |parent| and |background_images| passed to superclass. They are a weak ptr
19 // to owning class and the background images for the button background. 19 // to owning class and the background images for the button background.
20 WebIntentsButtonView(LocationBarView* parent, const int background_images[]); 20 WebIntentsButtonView(LocationBarView* parent,
21 const int background_images[],
22 const gfx::Font& font,
23 SkColor font_color);
21 virtual ~WebIntentsButtonView() {} 24 virtual ~WebIntentsButtonView() {}
22 25
23 virtual void Update(TabContents* tab_contents) OVERRIDE; 26 virtual void Update(TabContents* tab_contents) OVERRIDE;
24 27
25 protected: 28 protected:
26 virtual void OnClick(LocationBarView* parent) OVERRIDE; 29 virtual void OnClick(LocationBarView* parent) OVERRIDE;
27 virtual int GetTextAnimationSize(double state, int text_size) OVERRIDE; 30 virtual int GetTextAnimationSize(double state, int text_size) OVERRIDE;
28 31
29 private: 32 private:
30 DISALLOW_IMPLICIT_CONSTRUCTORS(WebIntentsButtonView); 33 DISALLOW_IMPLICIT_CONSTRUCTORS(WebIntentsButtonView);
31 }; 34 };
32 35
33 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_WEB_INTENTS_BUTTON_VIEW_H_ 36 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_WEB_INTENTS_BUTTON_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698