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

Unified Diff: chrome/browser/extensions/extension_tab_util.cc

Issue 145463002: Extensions: Send the tab id to platform apps. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 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/extensions/extension_tab_util.cc
===================================================================
--- chrome/browser/extensions/extension_tab_util.cc (revision 246091)
+++ chrome/browser/extensions/extension_tab_util.cc (working copy)
@@ -52,8 +52,8 @@
registry->GetShellWindowForRenderViewHost(contents->GetRenderViewHost());
if (!shell_window)
return NULL;
- return WindowControllerList::GetInstance()->
- FindWindowById(shell_window->session_id().id());
+ return WindowControllerList::GetInstance()->FindWindowById(
+ shell_window->session_id().id());
}
} // namespace
@@ -95,7 +95,7 @@
(!extension || controller->IsVisibleToExtension(extension))) {
return controller->CreateTabValue(extension, tab_index);
}
- base::DictionaryValue *result =
+ base::DictionaryValue* result =
CreateTabValue(contents, tab_strip, tab_index);
ScrubTabValueForExtension(contents, extension, result);
return result;
@@ -169,6 +169,14 @@
return result;
}
+base::DictionaryValue* ExtensionTabUtil::CreateTabValueForPlatformApp(
+ const WebContents* contents) {
+ base::DictionaryValue* result = new base::DictionaryValue();
+ result->SetInteger(keys::kIdKey, GetTabId(contents));
+ result->SetBoolean("isPlatformApp", true);
+ return result;
+}
+
void ExtensionTabUtil::ScrubTabValueForExtension(
const WebContents* contents,
const Extension* extension,

Powered by Google App Engine
This is Rietveld 408576698