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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_gtk.h

Issue 5790002: [gtk] tabcontents fade-out for instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile fixes Created 10 years 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/renderer_host/render_widget_host_view_gtk.h
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.h b/chrome/browser/renderer_host/render_widget_host_view_gtk.h
index 06655588d095ed64ccf402d7b68cab4e3c06372a..cd89ddbc6a654a868d68dd850a46321ca79a4f9c 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.h
@@ -11,6 +11,8 @@
#include <vector>
#include <string>
+#include "app/animation_delegate.h"
+#include "app/slide_animation.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
#include "chrome/browser/gtk/owned_widget_gtk.h"
@@ -40,7 +42,8 @@ typedef struct _GtkSelectionData GtkSelectionData;
// -----------------------------------------------------------------------------
// See comments in render_widget_host_view.h about this class and its members.
// -----------------------------------------------------------------------------
-class RenderWidgetHostViewGtk : public RenderWidgetHostView {
+class RenderWidgetHostViewGtk : public RenderWidgetHostView,
+ public AnimationDelegate {
public:
explicit RenderWidgetHostViewGtk(RenderWidgetHost* widget);
~RenderWidgetHostViewGtk();
@@ -84,10 +87,15 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView {
virtual void SetBackground(const SkBitmap& background);
virtual void CreatePluginContainer(gfx::PluginWindowHandle id);
virtual void DestroyPluginContainer(gfx::PluginWindowHandle id);
- virtual void SetVisuallyDeemphasized(bool deemphasized);
+ virtual void SetVisuallyDeemphasized(const SkColor* color, bool animate);
virtual bool ContainsNativeView(gfx::NativeView native_view) const;
virtual void AcceleratedCompositingActivated(bool activated);
+ // AnimationDelegate implementation.
+ virtual void AnimationEnded(const Animation* animation);
+ virtual void AnimationProgressed(const Animation* animation);
+ virtual void AnimationCanceled(const Animation* animation);
+
gfx::NativeView native_view() const { return view_.get(); }
// If the widget is aligned with an edge of the monitor its on and the user
@@ -164,8 +172,13 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView {
// The time it took after this view was selected for it to be fully painted.
base::TimeTicks tab_switch_paint_time_;
- // If true, fade the render widget when painting it.
- bool visually_deemphasized_;
+ // A color we use to shade the entire render view. If 100% transparent, we do
+ // not shade the render view.
+ SkColor overlay_color_;
+
+ // The animation used for the abovementioned shade effect. The animation's
+ // value affects the alpha we use for |overlay_color_|.
+ SlideAnimation overlay_animation_;
// Variables used only for popups --------------------------------------------
// Our parent widget.
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view.h ('k') | chrome/browser/renderer_host/render_widget_host_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698