| 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_GTK_LOCATION_BAR_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 GtkWidget* widget() { return hbox_.get(); } | 74 GtkWidget* widget() { return hbox_.get(); } |
| 75 | 75 |
| 76 // Returns the widget the page info bubble should point to. | 76 // Returns the widget the page info bubble should point to. |
| 77 GtkWidget* location_icon_widget() const { return location_icon_image_; } | 77 GtkWidget* location_icon_widget() const { return location_icon_image_; } |
| 78 | 78 |
| 79 // Returns the widget the extension installed bubble should point to. | 79 // Returns the widget the extension installed bubble should point to. |
| 80 GtkWidget* location_entry_widget() const { return entry_box_; } | 80 GtkWidget* location_entry_widget() const { return entry_box_; } |
| 81 | 81 |
| 82 Browser* browser() const { return browser_; } | 82 Browser* browser() const { return browser_; } |
| 83 | 83 |
| 84 // Returns the current WebContents. | |
| 85 content::WebContents* GetWebContents() const; | |
| 86 | |
| 87 // Sets |preview_enabled| for the PageActionViewGtk associated with this | 84 // Sets |preview_enabled| for the PageActionViewGtk associated with this |
| 88 // |page_action|. If |preview_enabled| is true, the view will display the | 85 // |page_action|. If |preview_enabled| is true, the view will display the |
| 89 // page action's icon even though it has not been activated by the extension. | 86 // page action's icon even though it has not been activated by the extension. |
| 90 // This is used by the ExtensionInstalledBubbleGtk to preview what the icon | 87 // This is used by the ExtensionInstalledBubbleGtk to preview what the icon |
| 91 // will look like for the user upon installation of the extension. | 88 // will look like for the user upon installation of the extension. |
| 92 void SetPreviewEnabledPageAction(ExtensionAction *page_action, | 89 void SetPreviewEnabledPageAction(ExtensionAction *page_action, |
| 93 bool preview_enabled); | 90 bool preview_enabled); |
| 94 | 91 |
| 95 // Retrieves the GtkWidget which is associated with PageActionView | 92 // Retrieves the GtkWidget which is associated with PageActionView |
| 96 // corresponding to |page_action|. | 93 // corresponding to |page_action|. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 123 content::PageTransition transition, | 120 content::PageTransition transition, |
| 124 const GURL& alternate_nav_url) OVERRIDE; | 121 const GURL& alternate_nav_url) OVERRIDE; |
| 125 virtual void OnChanged() OVERRIDE; | 122 virtual void OnChanged() OVERRIDE; |
| 126 virtual void OnSelectionBoundsChanged() OVERRIDE; | 123 virtual void OnSelectionBoundsChanged() OVERRIDE; |
| 127 virtual void OnKillFocus() OVERRIDE; | 124 virtual void OnKillFocus() OVERRIDE; |
| 128 virtual void OnSetFocus() OVERRIDE; | 125 virtual void OnSetFocus() OVERRIDE; |
| 129 virtual void OnInputInProgress(bool in_progress) OVERRIDE; | 126 virtual void OnInputInProgress(bool in_progress) OVERRIDE; |
| 130 virtual gfx::Image GetFavicon() const OVERRIDE; | 127 virtual gfx::Image GetFavicon() const OVERRIDE; |
| 131 virtual string16 GetTitle() const OVERRIDE; | 128 virtual string16 GetTitle() const OVERRIDE; |
| 132 virtual InstantController* GetInstant() OVERRIDE; | 129 virtual InstantController* GetInstant() OVERRIDE; |
| 133 virtual TabContents* GetTabContents() const OVERRIDE; | 130 virtual content::WebContents* GetWebContents() const OVERRIDE; |
| 134 | 131 |
| 135 // LocationBar: | 132 // LocationBar: |
| 136 virtual void ShowFirstRunBubble() OVERRIDE; | 133 virtual void ShowFirstRunBubble() OVERRIDE; |
| 137 virtual void SetInstantSuggestion( | 134 virtual void SetInstantSuggestion( |
| 138 const InstantSuggestion& suggestion) OVERRIDE; | 135 const InstantSuggestion& suggestion) OVERRIDE; |
| 139 virtual string16 GetInputString() const OVERRIDE; | 136 virtual string16 GetInputString() const OVERRIDE; |
| 140 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; | 137 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; |
| 141 virtual content::PageTransition GetPageTransition() const OVERRIDE; | 138 virtual content::PageTransition GetPageTransition() const OVERRIDE; |
| 142 virtual void AcceptInput() OVERRIDE; | 139 virtual void AcceptInput() OVERRIDE; |
| 143 virtual void FocusLocation(bool select_all) OVERRIDE; | 140 virtual void FocusLocation(bool select_all) OVERRIDE; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // Superclass for content settings icons shown at the left side of the | 174 // Superclass for content settings icons shown at the left side of the |
| 178 // location bar. | 175 // location bar. |
| 179 class PageToolViewGtk : public ui::AnimationDelegate { | 176 class PageToolViewGtk : public ui::AnimationDelegate { |
| 180 public: | 177 public: |
| 181 explicit PageToolViewGtk(const LocationBarViewGtk* parent); | 178 explicit PageToolViewGtk(const LocationBarViewGtk* parent); |
| 182 virtual ~PageToolViewGtk(); | 179 virtual ~PageToolViewGtk(); |
| 183 | 180 |
| 184 GtkWidget* widget(); | 181 GtkWidget* widget(); |
| 185 | 182 |
| 186 bool IsVisible(); | 183 bool IsVisible(); |
| 187 virtual void Update(TabContents* tab_contents) = 0; | 184 virtual void Update(content::WebContents* web_contents) = 0; |
| 188 | 185 |
| 189 // Overridden from ui::AnimationDelegate: | 186 // Overridden from ui::AnimationDelegate: |
| 190 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 187 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
| 191 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; | 188 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; |
| 192 virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE; | 189 virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE; |
| 193 | 190 |
| 194 protected: | 191 protected: |
| 195 // Theme constants for solid background elements. | 192 // Theme constants for solid background elements. |
| 196 virtual GdkColor button_border_color() const = 0; | 193 virtual GdkColor button_border_color() const = 0; |
| 197 virtual GdkColor gradient_top_color() const = 0; | 194 virtual GdkColor gradient_top_color() const = 0; |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 BooleanPrefMember edit_bookmarks_enabled_; | 534 BooleanPrefMember edit_bookmarks_enabled_; |
| 538 | 535 |
| 539 // Used to remember the URL and title text when drag&drop has begun. | 536 // Used to remember the URL and title text when drag&drop has begun. |
| 540 GURL drag_url_; | 537 GURL drag_url_; |
| 541 string16 drag_title_; | 538 string16 drag_title_; |
| 542 | 539 |
| 543 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); | 540 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); |
| 544 }; | 541 }; |
| 545 | 542 |
| 546 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ | 543 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| OLD | NEW |