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

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

Issue 1129883003: Pass Surface ID namespace to renderer compositors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set initial namespace value Created 5 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
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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 if (RenderThreadImpl::current()) { 707 if (RenderThreadImpl::current()) {
708 RenderThreadImpl::current()->WidgetCreated(); 708 RenderThreadImpl::current()->WidgetCreated();
709 if (is_hidden_) 709 if (is_hidden_)
710 RenderThreadImpl::current()->WidgetHidden(); 710 RenderThreadImpl::current()->WidgetHidden();
711 } 711 }
712 712
713 // If this is a popup, we must wait for the CreatingNew_ACK message before 713 // If this is a popup, we must wait for the CreatingNew_ACK message before
714 // completing initialization. Otherwise, we can finish it now. 714 // completing initialization. Otherwise, we can finish it now.
715 if (opener_id_ == MSG_ROUTING_NONE) { 715 if (opener_id_ == MSG_ROUTING_NONE) {
716 did_show_ = true; 716 did_show_ = true;
717 CompleteInit(); 717 CompleteInit(params.surface_id_namespace);
718 } 718 }
719 719
720 g_view_map.Get().insert(std::make_pair(webview(), this)); 720 g_view_map.Get().insert(std::make_pair(webview(), this));
721 g_routing_id_view_map.Get().insert(std::make_pair(routing_id_, this)); 721 g_routing_id_view_map.Get().insert(std::make_pair(routing_id_, this));
722 webview()->setDeviceScaleFactor(device_scale_factor_); 722 webview()->setDeviceScaleFactor(device_scale_factor_);
723 webview()->setDisplayMode(display_mode_); 723 webview()->setDisplayMode(display_mode_);
724 webview()->settings()->setPreferCompositingToLCDTextEnabled( 724 webview()->settings()->setPreferCompositingToLCDTextEnabled(
725 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 725 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
726 webview()->settings()->setThreadedScrollingEnabled( 726 webview()->settings()->setThreadedScrollingEnabled(
727 !command_line.HasSwitch(switches::kDisableThreadedScrolling)); 727 !command_line.HasSwitch(switches::kDisableThreadedScrolling));
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 view_params.swapped_out = false; 1597 view_params.swapped_out = false;
1598 view_params.replicated_frame_state = FrameReplicationState(); 1598 view_params.replicated_frame_state = FrameReplicationState();
1599 view_params.proxy_routing_id = MSG_ROUTING_NONE; 1599 view_params.proxy_routing_id = MSG_ROUTING_NONE;
1600 view_params.hidden = (params.disposition == NEW_BACKGROUND_TAB); 1600 view_params.hidden = (params.disposition == NEW_BACKGROUND_TAB);
1601 view_params.never_visible = never_visible; 1601 view_params.never_visible = never_visible;
1602 view_params.next_page_id = 1; 1602 view_params.next_page_id = 1;
1603 view_params.initial_size = initial_size; 1603 view_params.initial_size = initial_size;
1604 view_params.enable_auto_resize = false; 1604 view_params.enable_auto_resize = false;
1605 view_params.min_size = gfx::Size(); 1605 view_params.min_size = gfx::Size();
1606 view_params.max_size = gfx::Size(); 1606 view_params.max_size = gfx::Size();
1607 view_params.surface_id_namespace = 0;
1607 1608
1608 RenderViewImpl* view = 1609 RenderViewImpl* view =
1609 RenderViewImpl::Create(view_params, compositor_deps_, true); 1610 RenderViewImpl::Create(view_params, compositor_deps_, true);
1610 view->opened_by_user_gesture_ = params.user_gesture; 1611 view->opened_by_user_gesture_ = params.user_gesture;
1611 1612
1612 // Record whether the creator frame is trying to suppress the opener field. 1613 // Record whether the creator frame is trying to suppress the opener field.
1613 view->opener_suppressed_ = params.opener_suppressed; 1614 view->opener_suppressed_ = params.opener_suppressed;
1614 1615
1615 return view->webview(); 1616 return view->webview();
1616 } 1617 }
(...skipping 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after
3770 std::vector<gfx::Size> sizes; 3771 std::vector<gfx::Size> sizes;
3771 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 3772 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
3772 if (!url.isEmpty()) 3773 if (!url.isEmpty())
3773 urls.push_back( 3774 urls.push_back(
3774 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 3775 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
3775 } 3776 }
3776 SendUpdateFaviconURL(urls); 3777 SendUpdateFaviconURL(urls);
3777 } 3778 }
3778 3779
3779 } // namespace content 3780 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698