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

Side by Side Diff: content/renderer/render_widget.h

Issue 10544060: Merge 140030 - Revert 124453 - WebWidgetClient::screenInfo() no longer does a synchronous IPC. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1132/src/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_RENDERER_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <vector> 10 #include <vector>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // a RenderWidgetHost, the latter of which lives in a different process. 70 // a RenderWidgetHost, the latter of which lives in a different process.
71 class CONTENT_EXPORT RenderWidget 71 class CONTENT_EXPORT RenderWidget
72 : public IPC::Channel::Listener, 72 : public IPC::Channel::Listener,
73 public IPC::Message::Sender, 73 public IPC::Message::Sender,
74 NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient), 74 NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient),
75 public base::RefCounted<RenderWidget> { 75 public base::RefCounted<RenderWidget> {
76 public: 76 public:
77 // Creates a new RenderWidget. The opener_id is the routing ID of the 77 // Creates a new RenderWidget. The opener_id is the routing ID of the
78 // RenderView that this widget lives inside. 78 // RenderView that this widget lives inside.
79 static RenderWidget* Create(int32 opener_id, 79 static RenderWidget* Create(int32 opener_id,
80 WebKit::WebPopupType popup_type, 80 WebKit::WebPopupType popup_type);
81 const WebKit::WebScreenInfo& screen_info);
82 81
83 // Creates a WebWidget based on the popup type. 82 // Creates a WebWidget based on the popup type.
84 static WebKit::WebWidget* CreateWebWidget(RenderWidget* render_widget); 83 static WebKit::WebWidget* CreateWebWidget(RenderWidget* render_widget);
85 84
86 // The compositing surface assigned by the RenderWidgetHost 85 // The compositing surface assigned by the RenderWidgetHost
87 // (or RenderViewHost). Will be gfx::kNullPluginWindow if not assigned yet, 86 // (or RenderViewHost). Will be gfx::kNullPluginWindow if not assigned yet,
88 // in which case we should not create any GPU command buffers with it. 87 // in which case we should not create any GPU command buffers with it.
89 // The routing ID assigned by the RenderProcess. Will be MSG_ROUTING_NONE if 88 // The routing ID assigned by the RenderProcess. Will be MSG_ROUTING_NONE if
90 // not yet assigned a view ID, in which case, the process MUST NOT send 89 // not yet assigned a view ID, in which case, the process MUST NOT send
91 // messages with this ID to the parent. 90 // messages with this ID to the parent.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 friend class base::RefCounted<RenderWidget>; 159 friend class base::RefCounted<RenderWidget>;
161 // For unit tests. 160 // For unit tests.
162 friend class RenderWidgetTest; 161 friend class RenderWidgetTest;
163 162
164 enum ResizeAck { 163 enum ResizeAck {
165 SEND_RESIZE_ACK, 164 SEND_RESIZE_ACK,
166 NO_RESIZE_ACK, 165 NO_RESIZE_ACK,
167 }; 166 };
168 167
169 RenderWidget(WebKit::WebPopupType popup_type, 168 RenderWidget(WebKit::WebPopupType popup_type,
170 const WebKit::WebScreenInfo& screen_info,
171 bool swapped_out); 169 bool swapped_out);
172 virtual ~RenderWidget(); 170 virtual ~RenderWidget();
173 171
174 // Initializes this view with the given opener. CompleteInit must be called 172 // Initializes this view with the given opener. CompleteInit must be called
175 // later. 173 // later.
176 void Init(int32 opener_id); 174 void Init(int32 opener_id);
177 175
178 // Called by Init and subclasses to perform initialization. 176 // Called by Init and subclasses to perform initialization.
179 void DoInit(int32 opener_id, 177 void DoInit(int32 opener_id,
180 WebKit::WebWidget* web_widget, 178 WebKit::WebWidget* web_widget,
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 // pass state between DoDeferredUpdate and OnSwapBuffersPosted. 508 // pass state between DoDeferredUpdate and OnSwapBuffersPosted.
511 scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_; 509 scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_;
512 510
513 // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to 511 // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to
514 // delay sending of UpdateRect until the corresponding SwapBuffers has been 512 // delay sending of UpdateRect until the corresponding SwapBuffers has been
515 // executed. Since we can have several in flight, we need to keep them in a 513 // executed. Since we can have several in flight, we need to keep them in a
516 // queue. Note: some SwapBuffers may not correspond to an update, in which 514 // queue. Note: some SwapBuffers may not correspond to an update, in which
517 // case NULL is added to the queue. 515 // case NULL is added to the queue.
518 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; 516 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_;
519 517
520 // Properties of the screen hosting this RenderWidget instance.
521 WebKit::WebScreenInfo screen_info_;
522
523 // Set to true if we should invert all pixels. 518 // Set to true if we should invert all pixels.
524 bool invert_; 519 bool invert_;
525 520
526 // The Skia paint object for inverting. 521 // The Skia paint object for inverting.
527 scoped_ptr<SkPaint> invert_paint_; 522 scoped_ptr<SkPaint> invert_paint_;
528 523
529 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 524 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
530 }; 525 };
531 526
532 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 527 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698