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