| 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..498e8027e943ebc17de248b27d6c31e77b81bed8 100644
|
| --- a/chrome/browser/extensions/extension_tabs_module.cc
|
| +++ b/chrome/browser/extensions/extension_tabs_module.cc
|
| @@ -78,7 +78,8 @@ Browser* GetBrowserInProfileWithId(Profile* profile,
|
|
|
| // |error_message| can optionally be passed in and will be set with an
|
| // appropriate message if the tab cannot be found by id.
|
| -bool GetTabById(int tab_id, Profile* profile,
|
| +bool GetTabById(int tab_id,
|
| + Profile* profile,
|
| bool include_incognito,
|
| Browser** browser,
|
| TabStripModel** tab_strip,
|
| @@ -164,8 +165,9 @@ ListValue* ExtensionTabUtil::CreateTabList(const Browser* browser) {
|
| return tab_list;
|
| }
|
|
|
| -DictionaryValue* ExtensionTabUtil::CreateTabValue(
|
| - const TabContents* contents, TabStripModel* tab_strip, int tab_index) {
|
| +DictionaryValue* ExtensionTabUtil::CreateTabValue(const TabContents* contents,
|
| + TabStripModel* tab_strip,
|
| + int tab_index) {
|
| DictionaryValue* result = new DictionaryValue();
|
| result->SetInteger(keys::kIdKey, ExtensionTabUtil::GetTabId(contents));
|
| result->SetInteger(keys::kIndexKey, tab_index);
|
| @@ -192,6 +194,14 @@ DictionaryValue* ExtensionTabUtil::CreateTabValue(
|
| return result;
|
| }
|
|
|
| +DictionaryValue* ExtensionTabUtil::CreateTabValueActive(
|
| + const TabContents* contents,
|
| + bool active) {
|
| + 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,
|
| @@ -260,7 +270,8 @@ bool ExtensionTabUtil::GetDefaultTab(Browser* browser,
|
| return false;
|
| }
|
|
|
| -bool ExtensionTabUtil::GetTabById(int tab_id, Profile* profile,
|
| +bool ExtensionTabUtil::GetTabById(int tab_id,
|
| + Profile* profile,
|
| bool include_incognito,
|
| Browser** browser,
|
| TabStripModel** tab_strip,
|
| @@ -620,11 +631,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();
|
|
|