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

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

Issue 506075: Revert 34951 - Combine ViewHostMsg_{Paint,Scroll}Rect into one IPC.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_
7 7
8 #include "app/gfx/native_widget_types.h" 8 #include "app/gfx/native_widget_types.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // a paint ack after this returns, so if the view only ever invalidates in 103 // a paint ack after this returns, so if the view only ever invalidates in
104 // response to this, then on Windows, where WM_PAINT has lower priority than 104 // response to this, then on Windows, where WM_PAINT has lower priority than
105 // events which can cause renderer resizes/paint rect updates, e.g. 105 // events which can cause renderer resizes/paint rect updates, e.g.
106 // drag-resizing can starve painting; this function thus provides the view its 106 // drag-resizing can starve painting; this function thus provides the view its
107 // main chance to ensure it stays painted and not just invalidated. On the 107 // main chance to ensure it stays painted and not just invalidated. On the
108 // other hand, if this always blindly paints, then if we're already in the 108 // other hand, if this always blindly paints, then if we're already in the
109 // midst of a paint on the callstack, we can double-paint unnecessarily. 109 // midst of a paint on the callstack, we can double-paint unnecessarily.
110 // (Worse, we might recursively call RenderWidgetHost::GetBackingStore().) 110 // (Worse, we might recursively call RenderWidgetHost::GetBackingStore().)
111 // Thus implementers should generally paint as much of |rect| as possible 111 // Thus implementers should generally paint as much of |rect| as possible
112 // synchronously with as little overpainting as possible. 112 // synchronously with as little overpainting as possible.
113 virtual void DidPaintBackingStoreRects( 113 virtual void DidPaintRect(const gfx::Rect& rect) = 0;
114 const std::vector<gfx::Rect>& rects) = 0;
115 114
116 // Informs the view that a portion of the widget's backing store was scrolled 115 // Informs the view that a portion of the widget's backing store was scrolled
117 // by dx pixels horizontally and dy pixels vertically. The view should copy 116 // by dx pixels horizontally and dy pixels vertically. The view should copy
118 // the exposed pixels from the backing store of the render widget (which has 117 // the exposed pixels from the backing store of the render widget (which has
119 // already been scrolled) onto the screen. 118 // already been scrolled) onto the screen.
120 virtual void DidScrollBackingStoreRect( 119 virtual void DidScrollRect(
121 const gfx::Rect& rect, int dx, int dy) = 0; 120 const gfx::Rect& rect, int dx, int dy) = 0;
122 121
123 // Notifies the View that the renderer has ceased to exist. 122 // Notifies the View that the renderer has ceased to exist.
124 virtual void RenderViewGone() = 0; 123 virtual void RenderViewGone() = 0;
125 124
126 // Notifies the View that the renderer will be delete soon. 125 // Notifies the View that the renderer will be delete soon.
127 virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) = 0; 126 virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) = 0;
128 127
129 // Tells the View to destroy itself. 128 // Tells the View to destroy itself.
130 virtual void Destroy() = 0; 129 virtual void Destroy() = 0;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 186
188 // A custom background to paint behind the web content. This will be tiled 187 // A custom background to paint behind the web content. This will be tiled
189 // horizontally. Can be null, in which case we fall back to painting white. 188 // horizontally. Can be null, in which case we fall back to painting white.
190 SkBitmap background_; 189 SkBitmap background_;
191 190
192 private: 191 private:
193 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); 192 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView);
194 }; 193 };
195 194
196 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ 195 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698