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

Unified Diff: chrome/browser/guestview/guestview.cc

Issue 27408004: <webview>: Resolve relative paths as chrome-extension: URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed creis's comments Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/guestview/guestview.cc
diff --git a/chrome/browser/guestview/guestview.cc b/chrome/browser/guestview/guestview.cc
index edbced3d11416d90d4b2f0a6b108e14a4d5f4a68..62d529189a504a0e66db4a9b617ef176358aa6c4 100644
--- a/chrome/browser/guestview/guestview.cc
+++ b/chrome/browser/guestview/guestview.cc
@@ -41,9 +41,11 @@ scoped_ptr<DictionaryValue> GuestView::Event::GetArguments() {
return args_.Pass();
}
-GuestView::GuestView(WebContents* guest_web_contents)
+GuestView::GuestView(WebContents* guest_web_contents,
+ const std::string& extension_id)
: guest_web_contents_(guest_web_contents),
embedder_web_contents_(NULL),
+ extension_id_(extension_id),
embedder_render_process_id_(0),
browser_context_(guest_web_contents->GetBrowserContext()),
guest_instance_id_(guest_web_contents->GetEmbeddedInstanceID()),
@@ -64,12 +66,13 @@ GuestView::Type GuestView::GetViewTypeFromString(const std::string& api_type) {
// static
GuestView* GuestView::Create(WebContents* guest_web_contents,
+ const std::string& extension_id,
GuestView::Type view_type) {
switch (view_type) {
case GuestView::WEBVIEW:
- return new WebViewGuest(guest_web_contents);
+ return new WebViewGuest(guest_web_contents, extension_id);
case GuestView::ADVIEW:
- return new AdViewGuest(guest_web_contents);
+ return new AdViewGuest(guest_web_contents, extension_id);
default:
NOTREACHED();
return NULL;

Powered by Google App Engine
This is Rietveld 408576698