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

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

Issue 10704023: Moved ExtensionPrefs and related into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest-er master merged in Created 8 years, 5 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
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_toolbar_model.h" 5 #include "chrome/browser/extensions/extension_toolbar_model.h"
6 6
7 #include "chrome/browser/extensions/extension_browser_event_router.h" 7 #include "chrome/browser/extensions/extension_browser_event_router.h"
8 #include "chrome/browser/extensions/extension_prefs.h" 8 #include "chrome/browser/extensions/extension_prefs.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_tab_helper.h" 10 #include "chrome/browser/extensions/extension_tab_helper.h"
(...skipping 20 matching lines...) Expand all
31 DCHECK(service_); 31 DCHECK(service_);
32 32
33 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, 33 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
34 content::Source<Profile>(service_->profile())); 34 content::Source<Profile>(service_->profile()));
35 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 35 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
36 content::Source<Profile>(service_->profile())); 36 content::Source<Profile>(service_->profile()));
37 registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY, 37 registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY,
38 content::Source<Profile>(service_->profile())); 38 content::Source<Profile>(service_->profile()));
39 registrar_.Add( 39 registrar_.Add(
40 this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED, 40 this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
41 content::Source<ExtensionPrefs>(service_->extension_prefs())); 41 content::Source<extensions::ExtensionPrefs>(service_->extension_prefs()));
42 42
43 visible_icon_count_ = prefs_->GetInteger(prefs::kExtensionToolbarSize); 43 visible_icon_count_ = prefs_->GetInteger(prefs::kExtensionToolbarSize);
44 } 44 }
45 45
46 ExtensionToolbarModel::~ExtensionToolbarModel() { 46 ExtensionToolbarModel::~ExtensionToolbarModel() {
47 } 47 }
48 48
49 void ExtensionToolbarModel::AddObserver(Observer* observer) { 49 void ExtensionToolbarModel::AddObserver(Observer* observer) {
50 observers_.AddObserver(observer); 50 observers_.AddObserver(observer);
51 } 51 }
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 int incognito_index = 0, i = 0; 289 int incognito_index = 0, i = 0;
290 for (ExtensionList::iterator iter = begin(); iter != end(); 290 for (ExtensionList::iterator iter = begin(); iter != end();
291 ++iter, ++i) { 291 ++iter, ++i) {
292 if (original_index == i) 292 if (original_index == i)
293 break; 293 break;
294 if (service_->IsIncognitoEnabled((*iter)->id())) 294 if (service_->IsIncognitoEnabled((*iter)->id()))
295 ++incognito_index; 295 ++incognito_index;
296 } 296 }
297 return incognito_index; 297 return incognito_index;
298 } 298 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_system.cc ('k') | chrome/browser/extensions/installed_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698