| OLD | NEW |
| 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_ |
| OLD | NEW |