| 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; | |
| 13 | |
| 14 // Display the use-another-service button for web intents service pages | 12 // Display the use-another-service button for web intents service pages |
| 15 // displayed in a tab. | 13 // displayed in a tab. |
| 16 class WebIntentsButtonView : public LocationBarDecorationView { | 14 class WebIntentsButtonView : public LocationBarDecorationView { |
| 17 public: | 15 public: |
| 18 // |parent| and |background_images| passed to superclass. They are a weak ptr | 16 // |parent| and |background_images| passed to superclass. They are a weak ptr |
| 19 // to owning class and the background images for the button background. | 17 // to owning class and the background images for the button background. |
| 20 WebIntentsButtonView(LocationBarView* parent, | 18 WebIntentsButtonView(LocationBarView* parent, |
| 21 const int background_images[], | 19 const int background_images[], |
| 22 const gfx::Font& font, | 20 const gfx::Font& font, |
| 23 SkColor font_color); | 21 SkColor font_color); |
| 24 virtual ~WebIntentsButtonView() {} | 22 virtual ~WebIntentsButtonView() {} |
| 25 | 23 |
| 26 virtual void Update(TabContents* tab_contents) OVERRIDE; | 24 virtual void Update(content::WebContents* web_contents) OVERRIDE; |
| 27 | 25 |
| 28 protected: | 26 protected: |
| 29 virtual void OnClick(LocationBarView* parent) OVERRIDE; | 27 virtual void OnClick(LocationBarView* parent) OVERRIDE; |
| 30 virtual int GetTextAnimationSize(double state, int text_size) OVERRIDE; | 28 virtual int GetTextAnimationSize(double state, int text_size) OVERRIDE; |
| 31 | 29 |
| 32 private: | 30 private: |
| 33 DISALLOW_IMPLICIT_CONSTRUCTORS(WebIntentsButtonView); | 31 DISALLOW_IMPLICIT_CONSTRUCTORS(WebIntentsButtonView); |
| 34 }; | 32 }; |
| 35 | 33 |
| 36 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_WEB_INTENTS_BUTTON_VIEW_H_ | 34 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_WEB_INTENTS_BUTTON_VIEW_H_ |
| OLD | NEW |