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

Unified Diff: chrome/browser/ui/gtk/location_bar_view_gtk.h

Issue 10796116: [Web Intents] Basic location bar UI for window disposition picker affordance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
Index: chrome/browser/ui/gtk/location_bar_view_gtk.h
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.h b/chrome/browser/ui/gtk/location_bar_view_gtk.h
index 8ecfa8461d1601528b71f055a955254406af95d4..7328499730cc63fc5c307ea157e876e3851781fe 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.h
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.h
@@ -144,6 +144,7 @@ class LocationBarViewGtk : public OmniboxEditController,
virtual void UpdateContentSettingsIcons() OVERRIDE;
virtual void UpdatePageActions() OVERRIDE;
virtual void InvalidatePageActions() OVERRIDE;
+ virtual void UpdateWebIntentsTool() OVERRIDE;
Bernhard Bauer 2012/07/24 20:37:03 Is this method actually called from outside of thi
virtual void SaveStateToContents(content::WebContents* contents) OVERRIDE;
virtual void Revert() OVERRIDE;
virtual const OmniboxView* GetLocationEntry() const OVERRIDE;
@@ -169,6 +170,53 @@ class LocationBarViewGtk : public OmniboxEditController,
static const GdkColor kBackgroundColor;
private:
+ // TODO(gbillock): cause this public interface to be a platform-independent
+ // model interface for all the tools displayed in the location bar.
Bernhard Bauer 2012/07/24 20:37:03 Can you explain what this class does? IIUC, at the
+ class PageToolViewGtk : public ui::AnimationDelegate {
+ public:
+ PageToolViewGtk(const LocationBarViewGtk* parent);
+ virtual ~PageToolViewGtk();
+
+ GtkWidget* widget();
+
+ bool IsVisible();
+ void Update(TabContents* tab_contents); // TODO(gbillock): make TC const
+
+ // Overridden from ui::AnimationDelegate:
+ virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
+ virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
+ virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE;
+
+ private:
+ // Start the process of showing the label.
+ void StartAnimating();
+
+ CHROMEGTK_CALLBACK_1(PageToolViewGtk, gboolean, OnButtonPressed, GdkEvent*);
+ CHROMEGTK_CALLBACK_1(PageToolViewGtk, gboolean, OnExpose, GdkEventExpose*);
+
+ // The widgets for this view.
+ ui::OwnedWidgetGtk alignment_;
+ ui::OwnedWidgetGtk event_box_;
+ GtkWidget* hbox_;
+ ui::OwnedWidgetGtk image_;
+
+ // Explanatory text (e.g. "popup blocked").
+ ui::OwnedWidgetGtk label_;
+
+ // The owning LocationBarViewGtk.
+ const LocationBarViewGtk* parent_;
+
+ // When we show explanatory text, we slide it in/out.
+ ui::SlideAnimation animation_;
+
+ // The label's default requisition (cached so we can animate accordingly).
+ GtkRequisition label_req_;
+
+ base::WeakPtrFactory<PageToolViewGtk> weak_factory_;
Bernhard Bauer 2012/07/24 20:37:03 Is this used?
+
+ DISALLOW_COPY_AND_ASSIGN(PageToolViewGtk);
+ };
+
class ContentSettingImageViewGtk : public BubbleDelegateGtk,
public ui::AnimationDelegate {
public:
@@ -471,6 +519,10 @@ class LocationBarViewGtk : public OmniboxEditController,
ui::OwnedWidgetGtk page_action_hbox_;
ScopedVector<PageActionViewGtk> page_action_views_;
+ // Control for web intents window disposition picker control.
+ ui::OwnedWidgetGtk web_intents_hbox_;
+ PageToolViewGtk web_intents_tool_view_;
+
// The widget that contains our tab hints and the location bar.
GtkWidget* entry_box_;
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698