Chromium Code Reviews| Index: content/browser/browser_plugin/browser_plugin_guest.cc |
| diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc |
| index 5a55c7357d1afcfd91065c5ea69dd793f94e001a..58ebbfbaf404a492ccde77f9c1e361de8733984e 100644 |
| --- a/content/browser/browser_plugin/browser_plugin_guest.cc |
| +++ b/content/browser/browser_plugin/browser_plugin_guest.cc |
| @@ -365,6 +365,18 @@ BrowserPluginGuest::BrowserPluginGuest( |
| GetWebContents()); |
| } |
| +SiteInstance* BrowserPluginGuest::GetEmbedderSiteInstance() const { |
| + if (attached()) |
| + return embedder_web_contents()->GetSiteInstance(); |
| + |
| + if (!opener()) { |
|
Charlie Reis
2013/10/18 17:37:55
How do we know this is true? Couldn't we have an
Fady Samuel
2013/10/25 21:10:31
I've removed this method. It's no longer necessary
|
| + NOTREACHED(); |
| + return NULL; |
| + } |
| + |
| + return opener()->embedder_web_contents()->GetSiteInstance(); |
|
Charlie Reis
2013/10/18 17:37:55
This seems confusing to me. There's no guarantee
Fady Samuel
2013/10/25 21:10:31
Removed.
|
| +} |
| + |
| bool BrowserPluginGuest::AddMessageToConsole(WebContents* source, |
| int32 level, |
| const string16& message, |
| @@ -1342,7 +1354,7 @@ void BrowserPluginGuest::OnLockMouseAck(int instance_id, bool succeeded) { |
| void BrowserPluginGuest::OnNavigateGuest( |
| int instance_id, |
| const std::string& src) { |
| - GURL url(src); |
| + GURL url = delegate_ ? delegate_->ResolveURL(src) : GURL(src); |
| // We do not load empty urls in web_contents. |
| // If a guest sets empty src attribute after it has navigated to some |
| // non-empty page, the action is considered no-op. This empty src navigation |