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

Side by Side Diff: chrome/browser/ui/gtk/location_bar_view_gtk.h

Issue 23531053: ui/base/animation -> ui/gfx/animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 2 trunk Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 11 matching lines...) Expand all
22 #include "chrome/browser/extensions/extension_context_menu_model.h" 22 #include "chrome/browser/extensions/extension_context_menu_model.h"
23 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" 23 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
24 #include "chrome/browser/ui/gtk/menu_gtk.h" 24 #include "chrome/browser/ui/gtk/menu_gtk.h"
25 #include "chrome/browser/ui/omnibox/location_bar.h" 25 #include "chrome/browser/ui/omnibox/location_bar.h"
26 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" 26 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h"
27 #include "chrome/browser/ui/view_ids.h" 27 #include "chrome/browser/ui/view_ids.h"
28 #include "chrome/common/content_settings_types.h" 28 #include "chrome/common/content_settings_types.h"
29 #include "content/public/browser/notification_observer.h" 29 #include "content/public/browser/notification_observer.h"
30 #include "content/public/browser/notification_registrar.h" 30 #include "content/public/browser/notification_registrar.h"
31 #include "content/public/common/page_transition_types.h" 31 #include "content/public/common/page_transition_types.h"
32 #include "ui/base/animation/animation_delegate.h"
33 #include "ui/base/animation/slide_animation.h"
34 #include "ui/base/gtk/gtk_signal.h" 32 #include "ui/base/gtk/gtk_signal.h"
35 #include "ui/base/gtk/owned_widget_gtk.h" 33 #include "ui/base/gtk/owned_widget_gtk.h"
36 #include "ui/base/window_open_disposition.h" 34 #include "ui/base/window_open_disposition.h"
35 #include "ui/gfx/animation/animation_delegate.h"
36 #include "ui/gfx/animation/slide_animation.h"
37 #include "url/gurl.h" 37 #include "url/gurl.h"
38 38
39 class Browser; 39 class Browser;
40 class CommandUpdater; 40 class CommandUpdater;
41 class ContentSettingImageModel; 41 class ContentSettingImageModel;
42 class ContentSettingBubbleGtk; 42 class ContentSettingBubbleGtk;
43 class ExtensionAction; 43 class ExtensionAction;
44 class GtkThemeService; 44 class GtkThemeService;
45 class OmniboxViewGtk; 45 class OmniboxViewGtk;
46 46
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // content::NotificationObserver: 158 // content::NotificationObserver:
159 virtual void Observe(int type, 159 virtual void Observe(int type,
160 const content::NotificationSource& source, 160 const content::NotificationSource& source,
161 const content::NotificationDetails& details) OVERRIDE; 161 const content::NotificationDetails& details) OVERRIDE;
162 162
163 // Edit background color. 163 // Edit background color.
164 static const GdkColor kBackgroundColor; 164 static const GdkColor kBackgroundColor;
165 165
166 // Superclass for content settings icons shown at the left side of the 166 // Superclass for content settings icons shown at the left side of the
167 // location bar. 167 // location bar.
168 class PageToolViewGtk : public ui::AnimationDelegate { 168 class PageToolViewGtk : public gfx::AnimationDelegate {
169 public: 169 public:
170 PageToolViewGtk(); 170 PageToolViewGtk();
171 virtual ~PageToolViewGtk(); 171 virtual ~PageToolViewGtk();
172 172
173 GtkWidget* widget(); 173 GtkWidget* widget();
174 174
175 bool IsVisible(); 175 bool IsVisible();
176 176
177 // Updates the decoration from the shown WebContents. 177 // Updates the decoration from the shown WebContents.
178 virtual void UpdatePreLayout(content::WebContents* web_contents) = 0; 178 virtual void UpdatePreLayout(content::WebContents* web_contents) = 0;
179 179
180 // Performs any updates which depend on the image having already been laid 180 // Performs any updates which depend on the image having already been laid
181 // out by the owning LocationBarView. 181 // out by the owning LocationBarView.
182 virtual void UpdatePostLayout(content::WebContents* web_contents) = 0; 182 virtual void UpdatePostLayout(content::WebContents* web_contents) = 0;
183 183
184 // Overridden from ui::AnimationDelegate: 184 // Overridden from gfx::AnimationDelegate:
185 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 185 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
186 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; 186 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
187 virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE; 187 virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE;
188 188
189 protected: 189 protected:
190 // Theme constants for solid background elements. 190 // Theme constants for solid background elements.
191 virtual GdkColor button_border_color() const = 0; 191 virtual GdkColor button_border_color() const = 0;
192 virtual GdkColor gradient_top_color() const = 0; 192 virtual GdkColor gradient_top_color() const = 0;
193 virtual GdkColor gradient_bottom_color() const = 0; 193 virtual GdkColor gradient_bottom_color() const = 0;
194 194
195 // Delegate for ButtonPressed message. 195 // Delegate for ButtonPressed message.
196 virtual void OnClick(GtkWidget* sender) = 0; 196 virtual void OnClick(GtkWidget* sender) = 0;
197 197
198 // Start the process of showing the label. 198 // Start the process of showing the label.
199 void StartAnimating(); 199 void StartAnimating();
200 200
201 // Slide the label shut. 201 // Slide the label shut.
202 void CloseAnimation(); 202 void CloseAnimation();
203 203
204 CHROMEGTK_CALLBACK_1(PageToolViewGtk, gboolean, OnButtonPressed, GdkEvent*); 204 CHROMEGTK_CALLBACK_1(PageToolViewGtk, gboolean, OnButtonPressed, GdkEvent*);
205 CHROMEGTK_CALLBACK_1(PageToolViewGtk, gboolean, OnExpose, GdkEventExpose*); 205 CHROMEGTK_CALLBACK_1(PageToolViewGtk, gboolean, OnExpose, GdkEventExpose*);
206 206
207 // The widgets for this view. 207 // The widgets for this view.
208 ui::OwnedWidgetGtk alignment_; 208 ui::OwnedWidgetGtk alignment_;
209 ui::OwnedWidgetGtk event_box_; 209 ui::OwnedWidgetGtk event_box_;
210 GtkWidget* hbox_; 210 GtkWidget* hbox_;
211 ui::OwnedWidgetGtk image_; 211 ui::OwnedWidgetGtk image_;
212 212
213 // Explanatory text (e.g. "popup blocked"). 213 // Explanatory text (e.g. "popup blocked").
214 ui::OwnedWidgetGtk label_; 214 ui::OwnedWidgetGtk label_;
215 215
216 // When we show explanatory text, we slide it in/out. 216 // When we show explanatory text, we slide it in/out.
217 ui::SlideAnimation animation_; 217 gfx::SlideAnimation animation_;
218 218
219 // The label's default requisition (cached so we can animate accordingly). 219 // The label's default requisition (cached so we can animate accordingly).
220 GtkRequisition label_req_; 220 GtkRequisition label_req_;
221 221
222 base::WeakPtrFactory<PageToolViewGtk> weak_factory_; 222 base::WeakPtrFactory<PageToolViewGtk> weak_factory_;
223 223
224 private: 224 private:
225 DISALLOW_COPY_AND_ASSIGN(PageToolViewGtk); 225 DISALLOW_COPY_AND_ASSIGN(PageToolViewGtk);
226 }; 226 };
227 227
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 BooleanPrefMember edit_bookmarks_enabled_; 535 BooleanPrefMember edit_bookmarks_enabled_;
536 536
537 // Used to remember the URL and title text when drag&drop has begun. 537 // Used to remember the URL and title text when drag&drop has begun.
538 GURL drag_url_; 538 GURL drag_url_;
539 string16 drag_title_; 539 string16 drag_title_;
540 540
541 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); 541 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk);
542 }; 542 };
543 543
544 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ 544 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/infobars/translate_infobar_base_gtk.cc ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698