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

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

Issue 7134035: Make an inserted selected tab selected before calling TabInsertedAt on observers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename selected to active Created 9 years, 6 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_tabs_module.cc
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 44765bafd4468d99a4bf53f5e2ceef195b725176..48172d4738101612902451849ed39c68441b39cb 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -192,6 +192,13 @@ DictionaryValue* ExtensionTabUtil::CreateTabValue(
return result;
}
+DictionaryValue* ExtensionTabUtil::CreateTabValueActive(
+ const TabContents* contents, bool active) {
sky 2011/06/10 14:58:59 each param on its own line.
Yoyo Zhou 2011/06/10 18:04:01 Done here and elsewhere.
+ DictionaryValue* result = ExtensionTabUtil::CreateTabValue(contents);
+ result->SetBoolean(keys::kSelectedKey, active);
+ return result;
+}
+
// if |populate| is true, each window gets a list property |tabs| which contains
// fully populated tab objects.
DictionaryValue* ExtensionTabUtil::CreateWindowValue(const Browser* browser,
@@ -620,11 +627,11 @@ bool UpdateWindowFunction::RunImpl() {
if (set_bounds)
browser->window()->SetBounds(bounds);
- bool selected_val = false;
+ bool active_val = false;
if (update_props->HasKey(keys::kFocusedKey)) {
EXTENSION_FUNCTION_VALIDATE(update_props->GetBoolean(
- keys::kFocusedKey, &selected_val));
- if (selected_val)
+ keys::kFocusedKey, &active_val));
+ if (active_val)
browser->window()->Activate();
else
browser->window()->Deactivate();

Powered by Google App Engine
This is Rietveld 408576698