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

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

Issue 2873503002: NOT YET READY: Improve granularity of window namespaces in Blink.
Patch Set: Rebasing... Created 3 years, 6 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/renderer/render_frame_impl.cc ('k') | extensions/renderer/extension_frame_helper.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 #include <memory> 9 #include <memory>
10 10
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 const mojom::CreateViewParams& params, 561 const mojom::CreateViewParams& params,
562 const RenderWidget::ShowCallback& show_callback) { 562 const RenderWidget::ShowCallback& show_callback) {
563 bool was_created_by_renderer = !show_callback.is_null(); 563 bool was_created_by_renderer = !show_callback.is_null();
564 #if defined(OS_ANDROID) 564 #if defined(OS_ANDROID)
565 // TODO(sgurun): crbug.com/325351 Needed only for android webview's deprecated 565 // TODO(sgurun): crbug.com/325351 Needed only for android webview's deprecated
566 // HandleNavigation codepath. 566 // HandleNavigation codepath.
567 was_created_by_renderer_ = was_created_by_renderer; 567 was_created_by_renderer_ = was_created_by_renderer;
568 #endif 568 #endif
569 display_mode_ = params.initial_size.display_mode; 569 display_mode_ = params.initial_size.display_mode;
570 570
571 webview_ = WebView::Create(this, is_hidden() 571 WebFrame* opener_frame =
572 ? blink::kWebPageVisibilityStateHidden 572 RenderFrameImpl::ResolveOpener(params.opener_frame_route_id);
573 : blink::kWebPageVisibilityStateVisible); 573
574 webview_ =
575 WebView::Create(this,
576 is_hidden() ? blink::kWebPageVisibilityStateHidden
577 : blink::kWebPageVisibilityStateVisible,
578 opener_frame ? opener_frame->View() : nullptr);
574 RenderWidget::Init(show_callback, webview_->GetWidget()); 579 RenderWidget::Init(show_callback, webview_->GetWidget());
575 580
576 g_view_map.Get().insert(std::make_pair(webview(), this)); 581 g_view_map.Get().insert(std::make_pair(webview(), this));
577 g_routing_id_view_map.Get().insert(std::make_pair(GetRoutingID(), this)); 582 g_routing_id_view_map.Get().insert(std::make_pair(GetRoutingID(), this));
578 583
579 const base::CommandLine& command_line = 584 const base::CommandLine& command_line =
580 *base::CommandLine::ForCurrentProcess(); 585 *base::CommandLine::ForCurrentProcess();
581 586
582 if (command_line.HasSwitch(switches::kStatsCollectionController)) 587 if (command_line.HasSwitch(switches::kStatsCollectionController))
583 stats_collection_observer_.reset(new StatsCollectionObserver(this)); 588 stats_collection_observer_.reset(new StatsCollectionObserver(this));
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 WebSettings::PassiveEventListenerDefault::kFalse; 620 WebSettings::PassiveEventListenerDefault::kFalse;
616 if (passiveListenersDefault == "true") 621 if (passiveListenersDefault == "true")
617 passiveDefault = WebSettings::PassiveEventListenerDefault::kTrue; 622 passiveDefault = WebSettings::PassiveEventListenerDefault::kTrue;
618 else if (passiveListenersDefault == "forcealltrue") 623 else if (passiveListenersDefault == "forcealltrue")
619 passiveDefault = WebSettings::PassiveEventListenerDefault::kForceAllTrue; 624 passiveDefault = WebSettings::PassiveEventListenerDefault::kForceAllTrue;
620 webview()->GetSettings()->SetPassiveEventListenerDefault(passiveDefault); 625 webview()->GetSettings()->SetPassiveEventListenerDefault(passiveDefault);
621 } 626 }
622 627
623 ApplyBlinkSettings(command_line, webview()->GetSettings()); 628 ApplyBlinkSettings(command_line, webview()->GetSettings());
624 629
625 WebFrame* opener_frame =
626 RenderFrameImpl::ResolveOpener(params.opener_frame_route_id);
627
628 if (params.main_frame_routing_id != MSG_ROUTING_NONE) { 630 if (params.main_frame_routing_id != MSG_ROUTING_NONE) {
629 main_render_frame_ = RenderFrameImpl::CreateMainFrame( 631 main_render_frame_ = RenderFrameImpl::CreateMainFrame(
630 this, params.main_frame_routing_id, params.main_frame_widget_routing_id, 632 this, params.main_frame_routing_id, params.main_frame_widget_routing_id,
631 params.hidden, screen_info(), compositor_deps_, opener_frame); 633 params.hidden, screen_info(), compositor_deps_, opener_frame);
632 } 634 }
633 635
634 if (params.proxy_routing_id != MSG_ROUTING_NONE) { 636 if (params.proxy_routing_id != MSG_ROUTING_NONE) {
635 CHECK(params.swapped_out); 637 CHECK(params.swapped_out);
636 RenderFrameProxy::CreateFrameProxy(params.proxy_routing_id, GetRoutingID(), 638 RenderFrameProxy::CreateFrameProxy(params.proxy_routing_id, GetRoutingID(),
637 opener_frame, MSG_ROUTING_NONE, 639 opener_frame, MSG_ROUTING_NONE,
(...skipping 1947 matching lines...) Expand 10 before | Expand all | Expand 10 after
2585 input_event.GetCoalescedEventsPointers(), latency_info, 2587 input_event.GetCoalescedEventsPointers(), latency_info,
2586 dispatch_type); 2588 dispatch_type);
2587 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 2589 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
2588 } 2590 }
2589 idle_user_detector_->ActivityDetected(); 2591 idle_user_detector_->ActivityDetected();
2590 return RenderWidget::HandleInputEvent(input_event, latency_info, 2592 return RenderWidget::HandleInputEvent(input_event, latency_info,
2591 dispatch_type); 2593 dispatch_type);
2592 } 2594 }
2593 2595
2594 } // namespace content 2596 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | extensions/renderer/extension_frame_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698