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

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

Issue 1369603003: Remove 2-stage RenderWidget initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use_offscreen_contexts
Patch Set: review comments Created 5 years, 2 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
« no previous file with comments | « content/public/test/mock_render_process_host.cc ('k') | content/renderer/render_widget.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_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 // inherits from). 733 // inherits from).
734 AddRef(); 734 AddRef();
735 if (RenderThreadImpl::current()) { 735 if (RenderThreadImpl::current()) {
736 RenderThreadImpl::current()->WidgetCreated(); 736 RenderThreadImpl::current()->WidgetCreated();
737 if (is_hidden_) 737 if (is_hidden_)
738 RenderThreadImpl::current()->WidgetHidden(); 738 RenderThreadImpl::current()->WidgetHidden();
739 } 739 }
740 740
741 // If this is a popup, we must wait for the CreatingNew_ACK message before 741 // If this is a popup, we must wait for the CreatingNew_ACK message before
742 // completing initialization. Otherwise, we can finish it now. 742 // completing initialization. Otherwise, we can finish it now.
743 if (opener_id_ == MSG_ROUTING_NONE) { 743 if (opener_id_ == MSG_ROUTING_NONE)
744 did_show_ = true; 744 did_show_ = true;
745 CompleteInit();
746 }
747 745
748 webview()->setDeviceScaleFactor(device_scale_factor_); 746 webview()->setDeviceScaleFactor(device_scale_factor_);
749 webview()->setDisplayMode(display_mode_); 747 webview()->setDisplayMode(display_mode_);
750 webview()->settings()->setPreferCompositingToLCDTextEnabled( 748 webview()->settings()->setPreferCompositingToLCDTextEnabled(
751 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 749 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
752 webview()->settings()->setThreadedScrollingEnabled( 750 webview()->settings()->setThreadedScrollingEnabled(
753 !command_line.HasSwitch(switches::kDisableThreadedScrolling)); 751 !command_line.HasSwitch(switches::kDisableThreadedScrolling));
754 webview()->settings()->setRootLayerScrolls( 752 webview()->settings()->setRootLayerScrolls(
755 command_line.HasSwitch(switches::kRootLayerScrolls)); 753 command_line.HasSwitch(switches::kRootLayerScrolls));
756 754
(...skipping 2937 matching lines...) Expand 10 before | Expand all | Expand 10 after
3694 std::vector<gfx::Size> sizes; 3692 std::vector<gfx::Size> sizes;
3695 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 3693 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
3696 if (!url.isEmpty()) 3694 if (!url.isEmpty())
3697 urls.push_back( 3695 urls.push_back(
3698 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 3696 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
3699 } 3697 }
3700 SendUpdateFaviconURL(urls); 3698 SendUpdateFaviconURL(urls);
3701 } 3699 }
3702 3700
3703 } // namespace content 3701 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/mock_render_process_host.cc ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698