Chromium Code Reviews| Index: chrome/browser/extensions/extension_tabs_module.cc |
| =================================================================== |
| --- chrome/browser/extensions/extension_tabs_module.cc (revision 28937) |
| +++ chrome/browser/extensions/extension_tabs_module.cc (working copy) |
| @@ -115,6 +115,8 @@ |
| result->SetString(keys::kStatusKey, GetTabStatusText(status)); |
| result->SetBoolean(keys::kSelectedKey, |
| tab_strip && tab_index == tab_strip->selected_index()); |
| + result->SetBoolean(keys::kPinnedKey, |
| + tab_strip && tab_strip->IsTabPinned(tab_index)); |
| if (status != TAB_LOADING) { |
| result->SetString(keys::kTitleKey, UTF16ToWide(contents->GetTitle())); |
| @@ -522,6 +524,13 @@ |
| PageTransition::LINK, selected, index, true, NULL); |
| index = tab_strip->GetIndexOfTabContents(contents); |
| + if (args->HasKey(keys::kPinnedKey)) { |
| + bool pinned = false; |
| + EXTENSION_FUNCTION_VALIDATE(args->GetBoolean(keys::kPinnedKey, |
| + &pinned)); |
| + tab_strip->SetTabPinned(index, pinned); |
|
Aaron Boodman
2010/10/14 18:04:17
This part of the code has changed since you wrote
|
| + } |
| + |
| // Return data about the newly created tab. |
| if (has_callback()) |
| result_.reset(ExtensionTabUtil::CreateTabValue(contents, tab_strip, index)); |
| @@ -618,6 +627,14 @@ |
| } |
| } |
| + if (update_props->HasKey(keys::kPinnedKey)) { |
| + bool pinned = false; |
| + EXTENSION_FUNCTION_VALIDATE(update_props->GetBoolean( |
| + keys::kPinnedKey, |
| + &pinned)); |
| + tab_strip->SetTabPinned(tab_index, pinned); |
|
Aaron Boodman
2010/10/14 18:04:17
Same here.
|
| + } |
| + |
| if (has_callback()) |
| result_.reset(ExtensionTabUtil::CreateTabValue(contents, tab_strip, |
| tab_index)); |