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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 659093002: Pass the size to the RenderView on creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java_enum
Patch Set: Created 6 years, 1 month 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
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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 delegate_->GetSessionStorageNamespace(instance_.get())->id(); 281 delegate_->GetSessionStorageNamespace(instance_.get())->id();
282 params.frame_name = frame_name; 282 params.frame_name = frame_name;
283 // Ensure the RenderView sets its opener correctly. 283 // Ensure the RenderView sets its opener correctly.
284 params.opener_route_id = opener_route_id; 284 params.opener_route_id = opener_route_id;
285 params.swapped_out = !is_active_; 285 params.swapped_out = !is_active_;
286 params.proxy_routing_id = proxy_route_id; 286 params.proxy_routing_id = proxy_route_id;
287 params.hidden = is_hidden(); 287 params.hidden = is_hidden();
288 params.never_visible = delegate_->IsNeverVisible(); 288 params.never_visible = delegate_->IsNeverVisible();
289 params.window_was_created_with_opener = window_was_created_with_opener; 289 params.window_was_created_with_opener = window_was_created_with_opener;
290 params.next_page_id = next_page_id; 290 params.next_page_id = next_page_id;
291 GetWebScreenInfo(&params.screen_info); 291 GetNewViewResizeParams(&params.initial_size);
292 292
293 Send(new ViewMsg_New(params)); 293 Send(new ViewMsg_New(params));
294 294
295 // If it's enabled, tell the renderer to set up the Javascript bindings for 295 // If it's enabled, tell the renderer to set up the Javascript bindings for
296 // sending messages back to the browser. 296 // sending messages back to the browser.
297 if (GetProcess()->IsIsolatedGuest()) 297 if (GetProcess()->IsIsolatedGuest())
298 DCHECK_EQ(0, enabled_bindings_); 298 DCHECK_EQ(0, enabled_bindings_);
299 Send(new ViewMsg_AllowBindings(GetRoutingID(), enabled_bindings_)); 299 Send(new ViewMsg_AllowBindings(GetRoutingID(), enabled_bindings_));
300 // Let our delegate know that we created a RenderView. 300 // Let our delegate know that we created a RenderView.
301 delegate_->RenderViewCreated(this); 301 delegate_->RenderViewCreated(this);
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 // Note: We allow focus and blur from swapped out RenderViewHosts, even when 1226 // Note: We allow focus and blur from swapped out RenderViewHosts, even when
1227 // the active RenderViewHost is in a different BrowsingInstance (e.g., WebUI). 1227 // the active RenderViewHost is in a different BrowsingInstance (e.g., WebUI).
1228 delegate_->Activate(); 1228 delegate_->Activate();
1229 } 1229 }
1230 1230
1231 void RenderViewHostImpl::OnBlur() { 1231 void RenderViewHostImpl::OnBlur() {
1232 delegate_->Deactivate(); 1232 delegate_->Deactivate();
1233 } 1233 }
1234 1234
1235 gfx::Rect RenderViewHostImpl::GetRootWindowResizerRect() const { 1235 gfx::Rect RenderViewHostImpl::GetRootWindowResizerRect() const {
1236 if (!delegate_) return gfx::Rect();
piman 2014/10/29 18:42:57 In which case is that NULL? The 2 places that set
mkosiba (inactive) 2014/10/31 14:35:05 my bad, I got these mixed up with view_.
1236 return delegate_->GetRootWindowResizerRect(); 1237 return delegate_->GetRootWindowResizerRect();
1237 } 1238 }
1238 1239
1239 void RenderViewHostImpl::ForwardMouseEvent( 1240 void RenderViewHostImpl::ForwardMouseEvent(
1240 const blink::WebMouseEvent& mouse_event) { 1241 const blink::WebMouseEvent& mouse_event) {
1241 1242
1242 // We make a copy of the mouse event because 1243 // We make a copy of the mouse event because
1243 // RenderWidgetHost::ForwardMouseEvent will delete |mouse_event|. 1244 // RenderWidgetHost::ForwardMouseEvent will delete |mouse_event|.
1244 blink::WebMouseEvent event_copy(mouse_event); 1245 blink::WebMouseEvent event_copy(mouse_event);
1245 RenderWidgetHostImpl::ForwardMouseEvent(event_copy); 1246 RenderWidgetHostImpl::ForwardMouseEvent(event_copy);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 FrameTree* frame_tree = delegate_->GetFrameTree(); 1427 FrameTree* frame_tree = delegate_->GetFrameTree();
1427 1428
1428 frame_tree->ResetForMainFrameSwap(); 1429 frame_tree->ResetForMainFrameSwap();
1429 } 1430 }
1430 1431
1431 void RenderViewHostImpl::SelectWordAroundCaret() { 1432 void RenderViewHostImpl::SelectWordAroundCaret() {
1432 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1433 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1433 } 1434 }
1434 1435
1435 } // namespace content 1436 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698