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

Side by Side Diff: chrome/browser/extensions/extension_tab_util.cc

Issue 16915006: Convert most of extensions and some other random stuff to using the base namespace for Values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_tab_util.h" 5 #include "chrome/browser/extensions/extension_tab_util.h"
6 6
7 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" 7 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
8 #include "chrome/browser/extensions/shell_window_registry.h" 8 #include "chrome/browser/extensions/shell_window_registry.h"
9 #include "chrome/browser/extensions/tab_helper.h" 9 #include "chrome/browser/extensions/tab_helper.h"
10 #include "chrome/browser/extensions/window_controller.h" 10 #include "chrome/browser/extensions/window_controller.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 extensions::WindowController* controller = GetShellWindowController(contents); 92 extensions::WindowController* controller = GetShellWindowController(contents);
93 if (controller && 93 if (controller &&
94 (!extension || controller->IsVisibleToExtension(extension))) { 94 (!extension || controller->IsVisibleToExtension(extension))) {
95 return controller->CreateTabValue(extension, tab_index); 95 return controller->CreateTabValue(extension, tab_index);
96 } 96 }
97 DictionaryValue *result = CreateTabValue(contents, tab_strip, tab_index); 97 DictionaryValue *result = CreateTabValue(contents, tab_strip, tab_index);
98 ScrubTabValueForExtension(contents, extension, result); 98 ScrubTabValueForExtension(contents, extension, result);
99 return result; 99 return result;
100 } 100 }
101 101
102 ListValue* ExtensionTabUtil::CreateTabList( 102 base::ListValue* ExtensionTabUtil::CreateTabList(
103 const Browser* browser, 103 const Browser* browser,
104 const Extension* extension) { 104 const Extension* extension) {
105 ListValue* tab_list = new ListValue(); 105 base::ListValue* tab_list = new base::ListValue();
106 TabStripModel* tab_strip = browser->tab_strip_model(); 106 TabStripModel* tab_strip = browser->tab_strip_model();
107 for (int i = 0; i < tab_strip->count(); ++i) { 107 for (int i = 0; i < tab_strip->count(); ++i) {
108 tab_list->Append(CreateTabValue(tab_strip->GetWebContentsAt(i), 108 tab_list->Append(CreateTabValue(tab_strip->GetWebContentsAt(i),
109 tab_strip, 109 tab_strip,
110 i, 110 i,
111 extension)); 111 extension));
112 } 112 }
113 113
114 return tab_list; 114 return tab_list;
115 } 115 }
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 content::OpenURLParams params( 342 content::OpenURLParams params(
343 extensions::ManifestURL::GetOptionsPage(extension), 343 extensions::ManifestURL::GetOptionsPage(extension),
344 content::Referrer(), SINGLETON_TAB, 344 content::Referrer(), SINGLETON_TAB,
345 content::PAGE_TRANSITION_LINK, false); 345 content::PAGE_TRANSITION_LINK, false);
346 browser->OpenURL(params); 346 browser->OpenURL(params);
347 browser->window()->Show(); 347 browser->window()->Show();
348 WebContents* web_contents = 348 WebContents* web_contents =
349 browser->tab_strip_model()->GetActiveWebContents(); 349 browser->tab_strip_model()->GetActiveWebContents();
350 web_contents->GetDelegate()->ActivateContents(web_contents); 350 web_contents->GetDelegate()->ActivateContents(web_contents);
351 } 351 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698