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

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

Issue 10821114: Refactor the content setting view to allow a subclass for the web intents button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Consume tap-down gesture Created 8 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/content_setting_image_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/content_setting_image_view.h
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.h b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
index 6542adb640e77a2b9df3c834cd5d5278f15faee7..4657c11b6b1c5e17540e63d91b017c97a9de5eed 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.h
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
@@ -17,17 +17,20 @@
class ContentSettingImageModel;
class ContentSettingBubbleContents;
class LocationBarView;
+class TabContents;
namespace content {
class WebContents;
}
namespace views {
+class GestureEvent;
class MouseEvent;
}
namespace ui {
class SlideAnimation;
+enum GestureStatus;
}
class ContentSettingsDelegateView;
@@ -43,10 +46,12 @@ class ContentSettingImageView : public views::ImageView,
// |new_navigation| true if this is a new navigation, false if the tab was
// just switched to.
- void UpdateFromWebContents(content::WebContents* web_contents);
+ virtual void Update(TabContents* tab_contents);
// views::View overrides:
virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual ui::GestureStatus OnGestureEvent(
+ const views::GestureEvent& event) OVERRIDE;
// ui::AnimationDelegate overrides:
virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
@@ -59,6 +64,15 @@ class ContentSettingImageView : public views::ImageView,
// TouchableLocationBarView.
virtual int GetBuiltInHorizontalPadding() const OVERRIDE;
+ protected:
+ // Provide styling colors for button look.
+ virtual SkColor ButtonBorderColor() const;
+ virtual SkColor GradientTopColor() const;
+ virtual SkColor GradientBottomColor() const;
+
+ // Invoked when the user clicks on the control.
+ virtual void OnClick();
+
private:
// views::ImageView overrides:
virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/content_setting_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698