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

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

Issue 751043002: Refactor RenderView creation to use ViewMsg_New_Params. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on Charlie's review. Created 6 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
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | content/renderer/render_view_impl.h » ('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_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 void RenderThreadImpl::OnSetZoomLevelForCurrentURL(const std::string& scheme, 1356 void RenderThreadImpl::OnSetZoomLevelForCurrentURL(const std::string& scheme,
1357 const std::string& host, 1357 const std::string& host,
1358 double zoom_level) { 1358 double zoom_level) {
1359 RenderViewZoomer zoomer(scheme, host, zoom_level); 1359 RenderViewZoomer zoomer(scheme, host, zoom_level);
1360 RenderView::ForEach(&zoomer); 1360 RenderView::ForEach(&zoomer);
1361 } 1361 }
1362 1362
1363 void RenderThreadImpl::OnCreateNewView(const ViewMsg_New_Params& params) { 1363 void RenderThreadImpl::OnCreateNewView(const ViewMsg_New_Params& params) {
1364 EnsureWebKitInitialized(); 1364 EnsureWebKitInitialized();
1365 // When bringing in render_view, also bring in webkit's glue and jsbindings. 1365 // When bringing in render_view, also bring in webkit's glue and jsbindings.
1366 RenderViewImpl::Create(params.opener_route_id, 1366 RenderViewImpl::Create(params, false);
1367 params.window_was_created_with_opener,
1368 params.renderer_preferences,
1369 params.web_preferences,
1370 params.view_id,
1371 params.main_frame_routing_id,
1372 params.surface_id,
1373 params.session_storage_namespace_id,
1374 params.frame_name,
1375 false,
1376 params.swapped_out,
1377 params.proxy_routing_id,
1378 params.hidden,
1379 params.never_visible,
1380 params.next_page_id,
1381 params.initial_size,
1382 params.enable_auto_resize,
1383 params.min_size,
1384 params.max_size);
1385 } 1367 }
1386 1368
1387 GpuChannelHost* RenderThreadImpl::EstablishGpuChannelSync( 1369 GpuChannelHost* RenderThreadImpl::EstablishGpuChannelSync(
1388 CauseForGpuLaunch cause_for_gpu_launch) { 1370 CauseForGpuLaunch cause_for_gpu_launch) {
1389 TRACE_EVENT0("gpu", "RenderThreadImpl::EstablishGpuChannelSync"); 1371 TRACE_EVENT0("gpu", "RenderThreadImpl::EstablishGpuChannelSync");
1390 1372
1391 if (gpu_channel_.get()) { 1373 if (gpu_channel_.get()) {
1392 // Do nothing if we already have a GPU channel or are already 1374 // Do nothing if we already have a GPU channel or are already
1393 // establishing one. 1375 // establishing one.
1394 if (!gpu_channel_->IsLost()) 1376 if (!gpu_channel_->IsLost())
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 hidden_widget_count_--; 1611 hidden_widget_count_--;
1630 1612
1631 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1613 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1632 return; 1614 return;
1633 } 1615 }
1634 1616
1635 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1617 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1636 } 1618 }
1637 1619
1638 } // namespace content 1620 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698