summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_tabs_module.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 21:19:30 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 21:19:30 +0000
commiteb003245da4a579090d1e9bdee891587db451d4c (patch)
tree43f8d09c371c1e44a4eb62b19fa3c71f13034ef3 /chrome/browser/extensions/extension_tabs_module.cc
parentd7b893cb8bc916ada4c1c306a4857929cb6efdb6 (diff)
downloadchromium_src-eb003245da4a579090d1e9bdee891587db451d4c.zip
chromium_src-eb003245da4a579090d1e9bdee891587db451d4c.tar.gz
chromium_src-eb003245da4a579090d1e9bdee891587db451d4c.tar.bz2
Re-land r36338: Add the ability to focus a window to chrome.window.update().
BUG=31434 TBR=rafaelw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36407 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_tabs_module.cc')
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 19d2687..6f40ad6 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -386,7 +386,15 @@ bool UpdateWindowFunction::RunImpl() {
}
browser->window()->SetBounds(bounds);
- // TODO(rafaelw): Support |focused|.
+
+ if (update_props->HasKey(keys::kFocusedKey)) {
+ bool focused = false;
+ EXTENSION_FUNCTION_VALIDATE(update_props->GetBoolean(keys::kFocusedKey,
+ &focused));
+ if (focused)
+ browser->window()->Activate();
+ }
+
result_.reset(ExtensionTabUtil::CreateWindowValue(browser, false));
return true;