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

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

Issue 10171018: Create swapped-out opener RVHs after a process swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove parameter comments. Created 8 years, 7 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_widget.h ('k') | content/renderer/render_widget_fullscreen.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 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 using WebKit::WebRect; 65 using WebKit::WebRect;
66 using WebKit::WebScreenInfo; 66 using WebKit::WebScreenInfo;
67 using WebKit::WebSize; 67 using WebKit::WebSize;
68 using WebKit::WebTextDirection; 68 using WebKit::WebTextDirection;
69 using WebKit::WebTouchEvent; 69 using WebKit::WebTouchEvent;
70 using WebKit::WebVector; 70 using WebKit::WebVector;
71 using WebKit::WebWidget; 71 using WebKit::WebWidget;
72 using content::RenderThread; 72 using content::RenderThread;
73 73
74 RenderWidget::RenderWidget(WebKit::WebPopupType popup_type, 74 RenderWidget::RenderWidget(WebKit::WebPopupType popup_type,
75 const WebKit::WebScreenInfo& screen_info) 75 const WebKit::WebScreenInfo& screen_info,
76 bool swapped_out)
76 : routing_id_(MSG_ROUTING_NONE), 77 : routing_id_(MSG_ROUTING_NONE),
77 surface_id_(0), 78 surface_id_(0),
78 webwidget_(NULL), 79 webwidget_(NULL),
79 opener_id_(MSG_ROUTING_NONE), 80 opener_id_(MSG_ROUTING_NONE),
80 host_window_(0), 81 host_window_(0),
81 host_window_set_(false), 82 host_window_set_(false),
82 current_paint_buf_(NULL), 83 current_paint_buf_(NULL),
83 next_paint_flags_(0), 84 next_paint_flags_(0),
84 filtered_time_per_frame_(0.0f), 85 filtered_time_per_frame_(0.0f),
85 update_reply_pending_(false), 86 update_reply_pending_(false),
86 using_asynchronous_swapbuffers_(false), 87 using_asynchronous_swapbuffers_(false),
87 num_swapbuffers_complete_pending_(0), 88 num_swapbuffers_complete_pending_(0),
88 did_show_(false), 89 did_show_(false),
89 is_hidden_(false), 90 is_hidden_(false),
90 is_fullscreen_(false), 91 is_fullscreen_(false),
91 needs_repainting_on_restore_(false), 92 needs_repainting_on_restore_(false),
92 has_focus_(false), 93 has_focus_(false),
93 handling_input_event_(false), 94 handling_input_event_(false),
94 closing_(false), 95 closing_(false),
95 is_swapped_out_(false), 96 is_swapped_out_(swapped_out),
96 input_method_is_active_(false), 97 input_method_is_active_(false),
97 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), 98 text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
98 can_compose_inline_(true), 99 can_compose_inline_(true),
99 popup_type_(popup_type), 100 popup_type_(popup_type),
100 pending_window_rect_count_(0), 101 pending_window_rect_count_(0),
101 suppress_next_char_events_(false), 102 suppress_next_char_events_(false),
102 is_accelerated_compositing_active_(false), 103 is_accelerated_compositing_active_(false),
103 animation_update_pending_(false), 104 animation_update_pending_(false),
104 invalidation_task_posted_(false), 105 invalidation_task_posted_(false),
105 screen_info_(screen_info), 106 screen_info_(screen_info),
(...skipping 15 matching lines...) Expand all
121 if (!is_swapped_out_) 122 if (!is_swapped_out_)
122 RenderProcess::current()->ReleaseProcess(); 123 RenderProcess::current()->ReleaseProcess();
123 } 124 }
124 125
125 // static 126 // static
126 RenderWidget* RenderWidget::Create(int32 opener_id, 127 RenderWidget* RenderWidget::Create(int32 opener_id,
127 WebKit::WebPopupType popup_type, 128 WebKit::WebPopupType popup_type,
128 const WebKit::WebScreenInfo& screen_info) { 129 const WebKit::WebScreenInfo& screen_info) {
129 DCHECK(opener_id != MSG_ROUTING_NONE); 130 DCHECK(opener_id != MSG_ROUTING_NONE);
130 scoped_refptr<RenderWidget> widget( 131 scoped_refptr<RenderWidget> widget(
131 new RenderWidget(popup_type, screen_info)); 132 new RenderWidget(popup_type, screen_info, false));
132 widget->Init(opener_id); // adds reference 133 widget->Init(opener_id); // adds reference
133 return widget; 134 return widget;
134 } 135 }
135 136
136 // static 137 // static
137 WebWidget* RenderWidget::CreateWebWidget(RenderWidget* render_widget) { 138 WebWidget* RenderWidget::CreateWebWidget(RenderWidget* render_widget) {
138 switch (render_widget->popup_type_) { 139 switch (render_widget->popup_type_) {
139 case WebKit::WebPopupTypeNone: // Nothing to create. 140 case WebKit::WebPopupTypeNone: // Nothing to create.
140 break; 141 break;
141 case WebKit::WebPopupTypeSelect: 142 case WebKit::WebPopupTypeSelect:
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 } 1697 }
1697 } 1698 }
1698 1699
1699 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1700 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1700 return false; 1701 return false;
1701 } 1702 }
1702 1703
1703 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1704 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1704 return false; 1705 return false;
1705 } 1706 }
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/renderer/render_widget_fullscreen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698