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

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

Issue 9717011: Expose the chrome.windows.* API to platform apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/extensions/platform_app_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_tabs_module.cc
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 6ca8536075d86b19c1484f327ae1513f2e662844..fd84c72cd566184b67bd5acb92f541e817ecf8b7 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -36,6 +36,7 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/extensions/shell_window.h"
#include "chrome/browser/ui/panels/panel_manager.h"
#include "chrome/browser/ui/snapshot_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
@@ -585,6 +586,15 @@ bool CreateWindowFunction::RunImpl() {
window_type = Browser::TYPE_PANEL;
else
window_type = Browser::TYPE_POPUP;
+ } else if (type_str == keys::kWindowTypeValueShell &&
+ GetExtension()->is_platform_app()) {
+ GURL window_url =
+ urls.empty() ? GetExtension()->GetFullLaunchURL() : urls[0];
+ ShellWindow* shell_window =
+ ShellWindow::Create(window_profile, GetExtension(), window_url);
jstritar 2012/03/19 19:08:52 |window_profile| can be an incognito profile, if s
+ result_.reset(shell_window->extension_window_controller()->
+ CreateWindowValueWithTabs());
+ return true;
} else if (type_str != keys::kWindowTypeValueNormal) {
error_ = keys::kInvalidWindowTypeError;
return false;
« no previous file with comments | « no previous file | chrome/browser/extensions/platform_app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698