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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_gtk.h

Issue 6154001: Move animation code to new ui/base/animation directory.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gdk/gdk.h> 9 #include <gdk/gdk.h>
10 10
11 #include <vector> 11 #include <vector>
12 #include <string> 12 #include <string>
13 13
14 #include "app/animation_delegate.h"
15 #include "app/slide_animation.h"
16 #include "base/scoped_ptr.h" 14 #include "base/scoped_ptr.h"
17 #include "base/time.h" 15 #include "base/time.h"
18 #include "chrome/browser/gtk/owned_widget_gtk.h" 16 #include "chrome/browser/gtk/owned_widget_gtk.h"
19 #include "chrome/browser/renderer_host/render_widget_host_view.h" 17 #include "chrome/browser/renderer_host/render_widget_host_view.h"
20 #include "gfx/native_widget_types.h" 18 #include "gfx/native_widget_types.h"
21 #include "gfx/rect.h" 19 #include "gfx/rect.h"
20 #include "ui/base/animation/animation_delegate.h"
21 #include "ui/base/animation/slide_animation.h"
22 #include "webkit/glue/webcursor.h" 22 #include "webkit/glue/webcursor.h"
23 #include "webkit/plugins/npapi/gtk_plugin_container_manager.h" 23 #include "webkit/plugins/npapi/gtk_plugin_container_manager.h"
24 24
25 class RenderWidgetHost; 25 class RenderWidgetHost;
26 class GtkIMContextWrapper; 26 class GtkIMContextWrapper;
27 class GtkKeyBindingsHandler; 27 class GtkKeyBindingsHandler;
28 #if !defined(TOOLKIT_VIEWS) 28 #if !defined(TOOLKIT_VIEWS)
29 class MenuGtk; 29 class MenuGtk;
30 #endif 30 #endif
31 struct NativeWebKeyboardEvent; 31 struct NativeWebKeyboardEvent;
32 32
33 #if defined(OS_CHROMEOS) 33 #if defined(OS_CHROMEOS)
34 namespace views { 34 namespace views {
35 class TooltipWindowGtk; 35 class TooltipWindowGtk;
36 } 36 }
37 #endif // defined(OS_CHROMEOS) 37 #endif // defined(OS_CHROMEOS)
38 38
39 typedef struct _GtkClipboard GtkClipboard; 39 typedef struct _GtkClipboard GtkClipboard;
40 typedef struct _GtkSelectionData GtkSelectionData; 40 typedef struct _GtkSelectionData GtkSelectionData;
41 41
42 // ----------------------------------------------------------------------------- 42 // -----------------------------------------------------------------------------
43 // See comments in render_widget_host_view.h about this class and its members. 43 // See comments in render_widget_host_view.h about this class and its members.
44 // ----------------------------------------------------------------------------- 44 // -----------------------------------------------------------------------------
45 class RenderWidgetHostViewGtk : public RenderWidgetHostView, 45 class RenderWidgetHostViewGtk : public RenderWidgetHostView,
46 public AnimationDelegate { 46 public ui::AnimationDelegate {
47 public: 47 public:
48 explicit RenderWidgetHostViewGtk(RenderWidgetHost* widget); 48 explicit RenderWidgetHostViewGtk(RenderWidgetHost* widget);
49 ~RenderWidgetHostViewGtk(); 49 ~RenderWidgetHostViewGtk();
50 50
51 // Initialize this object for use as a drawing area. 51 // Initialize this object for use as a drawing area.
52 void InitAsChild(); 52 void InitAsChild();
53 53
54 // RenderWidgetHostView implementation. 54 // RenderWidgetHostView implementation.
55 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, 55 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
56 const gfx::Rect& pos); 56 const gfx::Rect& pos);
(...skipping 28 matching lines...) Expand all
85 virtual void SelectionChanged(const std::string& text); 85 virtual void SelectionChanged(const std::string& text);
86 virtual void ShowingContextMenu(bool showing); 86 virtual void ShowingContextMenu(bool showing);
87 virtual BackingStore* AllocBackingStore(const gfx::Size& size); 87 virtual BackingStore* AllocBackingStore(const gfx::Size& size);
88 virtual void SetBackground(const SkBitmap& background); 88 virtual void SetBackground(const SkBitmap& background);
89 virtual void CreatePluginContainer(gfx::PluginWindowHandle id); 89 virtual void CreatePluginContainer(gfx::PluginWindowHandle id);
90 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id); 90 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id);
91 virtual void SetVisuallyDeemphasized(const SkColor* color, bool animate); 91 virtual void SetVisuallyDeemphasized(const SkColor* color, bool animate);
92 virtual bool ContainsNativeView(gfx::NativeView native_view) const; 92 virtual bool ContainsNativeView(gfx::NativeView native_view) const;
93 virtual void AcceleratedCompositingActivated(bool activated); 93 virtual void AcceleratedCompositingActivated(bool activated);
94 94
95 // AnimationDelegate implementation. 95 // ui::AnimationDelegate implementation.
96 virtual void AnimationEnded(const Animation* animation); 96 virtual void AnimationEnded(const ui::Animation* animation);
97 virtual void AnimationProgressed(const Animation* animation); 97 virtual void AnimationProgressed(const ui::Animation* animation);
98 virtual void AnimationCanceled(const Animation* animation); 98 virtual void AnimationCanceled(const ui::Animation* animation);
99 99
100 gfx::NativeView native_view() const { return view_.get(); } 100 gfx::NativeView native_view() const { return view_.get(); }
101 101
102 // If the widget is aligned with an edge of the monitor its on and the user 102 // If the widget is aligned with an edge of the monitor its on and the user
103 // attempts to drag past that edge we track the number of times it has 103 // attempts to drag past that edge we track the number of times it has
104 // occurred, so that we can force the widget to scroll when it otherwise 104 // occurred, so that we can force the widget to scroll when it otherwise
105 // would be unable to. 105 // would be unable to.
106 void ModifyEventForEdgeDragging(GtkWidget* widget, GdkEventMotion* event); 106 void ModifyEventForEdgeDragging(GtkWidget* widget, GdkEventMotion* event);
107 void Paint(const gfx::Rect&); 107 void Paint(const gfx::Rect&);
108 108
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 // The time it took after this view was selected for it to be fully painted. 173 // The time it took after this view was selected for it to be fully painted.
174 base::TimeTicks tab_switch_paint_time_; 174 base::TimeTicks tab_switch_paint_time_;
175 175
176 // A color we use to shade the entire render view. If 100% transparent, we do 176 // A color we use to shade the entire render view. If 100% transparent, we do
177 // not shade the render view. 177 // not shade the render view.
178 SkColor overlay_color_; 178 SkColor overlay_color_;
179 179
180 // The animation used for the abovementioned shade effect. The animation's 180 // The animation used for the abovementioned shade effect. The animation's
181 // value affects the alpha we use for |overlay_color_|. 181 // value affects the alpha we use for |overlay_color_|.
182 SlideAnimation overlay_animation_; 182 ui::SlideAnimation overlay_animation_;
183 183
184 // Variables used only for popups -------------------------------------------- 184 // Variables used only for popups --------------------------------------------
185 // Our parent widget. 185 // Our parent widget.
186 RenderWidgetHostView* parent_host_view_; 186 RenderWidgetHostView* parent_host_view_;
187 // The native view of our parent, equivalent to 187 // The native view of our parent, equivalent to
188 // parent_host_view_->GetNativeView(). 188 // parent_host_view_->GetNativeView().
189 GtkWidget* parent_; 189 GtkWidget* parent_;
190 // We ignore the first mouse release on popups. This allows the popup to 190 // We ignore the first mouse release on popups. This allows the popup to
191 // stay open. 191 // stay open.
192 bool is_popup_first_mouse_release_; 192 bool is_popup_first_mouse_release_;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // indicate the top edge, positive the bottom. 224 // indicate the top edge, positive the bottom.
225 int dragged_at_vertical_edge_; 225 int dragged_at_vertical_edge_;
226 226
227 #if defined(OS_CHROMEOS) 227 #if defined(OS_CHROMEOS)
228 // Custimized tooltip window. 228 // Custimized tooltip window.
229 scoped_ptr<views::TooltipWindowGtk> tooltip_window_; 229 scoped_ptr<views::TooltipWindowGtk> tooltip_window_;
230 #endif // defined(OS_CHROMEOS) 230 #endif // defined(OS_CHROMEOS)
231 }; 231 };
232 232
233 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ 233 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698