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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 17846010: <webview>: Move contentload event from content to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guestview_loadstop
Patch Set: Merge with ToT Created 7 years, 5 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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 SiteInstance* site_instance, 425 SiteInstance* site_instance,
426 int guest_instance_id, 426 int guest_instance_id,
427 scoped_ptr<base::DictionaryValue> extra_params) { 427 scoped_ptr<base::DictionaryValue> extra_params) {
428 WebContentsImpl* new_contents = new WebContentsImpl(browser_context, NULL); 428 WebContentsImpl* new_contents = new WebContentsImpl(browser_context, NULL);
429 429
430 // This makes |new_contents| act as a guest. 430 // This makes |new_contents| act as a guest.
431 // For more info, see comment above class BrowserPluginGuest. 431 // For more info, see comment above class BrowserPluginGuest.
432 BrowserPluginGuest::Create( 432 BrowserPluginGuest::Create(
433 guest_instance_id, new_contents, extra_params.Pass()); 433 guest_instance_id, new_contents, extra_params.Pass());
434 434
435 GetContentClient()->browser()->GuestWebContentsCreated(
436 NULL, new_contents, extra_params.Pass());
437
435 WebContents::CreateParams create_params(browser_context, site_instance); 438 WebContents::CreateParams create_params(browser_context, site_instance);
436 new_contents->Init(create_params); 439 new_contents->Init(create_params);
437 440
438 // We are instantiating a WebContents for browser plugin. Set its subframe bit 441 // We are instantiating a WebContents for browser plugin. Set its subframe bit
439 // to true. 442 // to true.
440 static_cast<RenderViewHostImpl*>( 443 static_cast<RenderViewHostImpl*>(
441 new_contents->GetRenderViewHost())->set_is_subframe(true); 444 new_contents->GetRenderViewHost())->set_is_subframe(true);
442 445
443 return new_contents->browser_plugin_guest_.get(); 446 return new_contents->browser_plugin_guest_.get();
444 } 447 }
(...skipping 3238 matching lines...) Expand 10 before | Expand all | Expand 10 after
3683 } 3686 }
3684 3687
3685 BrowserPluginGuestManager* 3688 BrowserPluginGuestManager*
3686 WebContentsImpl::GetBrowserPluginGuestManager() const { 3689 WebContentsImpl::GetBrowserPluginGuestManager() const {
3687 return static_cast<BrowserPluginGuestManager*>( 3690 return static_cast<BrowserPluginGuestManager*>(
3688 GetBrowserContext()->GetUserData( 3691 GetBrowserContext()->GetUserData(
3689 browser_plugin::kBrowserPluginGuestManagerKeyName)); 3692 browser_plugin::kBrowserPluginGuestManagerKeyName));
3690 } 3693 }
3691 3694
3692 } // namespace content 3695 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698