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

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

Issue 27408004: <webview>: Resolve relative paths as chrome-extension: URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor + addressed creis' comments Created 7 years, 1 month 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 BrowserPluginGuest* WebContentsImpl::CreateGuest( 445 BrowserPluginGuest* WebContentsImpl::CreateGuest(
446 BrowserContext* browser_context, 446 BrowserContext* browser_context,
447 SiteInstance* site_instance, 447 SiteInstance* site_instance,
448 int guest_instance_id, 448 int guest_instance_id,
449 scoped_ptr<base::DictionaryValue> extra_params) { 449 scoped_ptr<base::DictionaryValue> extra_params) {
450 WebContentsImpl* new_contents = new WebContentsImpl(browser_context, NULL); 450 WebContentsImpl* new_contents = new WebContentsImpl(browser_context, NULL);
451 451
452 // This makes |new_contents| act as a guest. 452 // This makes |new_contents| act as a guest.
453 // For more info, see comment above class BrowserPluginGuest. 453 // For more info, see comment above class BrowserPluginGuest.
454 BrowserPluginGuest::Create( 454 BrowserPluginGuest::Create(
455 guest_instance_id, new_contents, extra_params.Pass()); 455 guest_instance_id, site_instance, new_contents, extra_params.Pass());
Charlie Reis 2013/10/30 20:42:20 Which SiteInstance is this? How does it get the e
456 456
457 WebContents::CreateParams create_params(browser_context, site_instance); 457 WebContents::CreateParams create_params(browser_context, site_instance);
458 new_contents->Init(create_params); 458 new_contents->Init(create_params);
459 459
460 // We are instantiating a WebContents for browser plugin. Set its subframe bit 460 // We are instantiating a WebContents for browser plugin. Set its subframe bit
461 // to true. 461 // to true.
462 static_cast<RenderViewHostImpl*>( 462 static_cast<RenderViewHostImpl*>(
463 new_contents->GetRenderViewHost())->set_is_subframe(true); 463 new_contents->GetRenderViewHost())->set_is_subframe(true);
464 464
465 return new_contents->browser_plugin_guest_.get(); 465 return new_contents->browser_plugin_guest_.get();
(...skipping 3182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3648 } 3648 }
3649 3649
3650 void WebContentsImpl::OnFrameRemoved( 3650 void WebContentsImpl::OnFrameRemoved(
3651 RenderViewHostImpl* render_view_host, 3651 RenderViewHostImpl* render_view_host,
3652 int64 frame_id) { 3652 int64 frame_id) {
3653 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3653 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3654 FrameDetached(render_view_host, frame_id)); 3654 FrameDetached(render_view_host, frame_id));
3655 } 3655 }
3656 3656
3657 } // namespace content 3657 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698