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

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

Issue 567037: Initial work on making extensions work in incognito mode. (Closed)
Patch Set: added experimental requirement Created 10 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_
7 7
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "chrome/common/extensions/extension.h" 9 #include "chrome/common/extensions/extension.h"
10 #include "chrome/common/notification_observer.h" 10 #include "chrome/common/notification_observer.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 ExtensionList::iterator begin() { 45 ExtensionList::iterator begin() {
46 return toolitems_.begin(); 46 return toolitems_.begin();
47 } 47 }
48 48
49 ExtensionList::iterator end() { 49 ExtensionList::iterator end() {
50 return toolitems_.end(); 50 return toolitems_.end();
51 } 51 }
52 52
53 // Utility functions for converting between an index into the list of
54 // incognito-enabled browser actions, and the list of all browser actions.
55 int IncognitoIndexToOriginal(int incognito_index);
56 int OriginalIndexToIncognito(int original_index);
57
53 private: 58 private:
54 // NotificationObserver implementation. 59 // NotificationObserver implementation.
55 virtual void Observe(NotificationType type, 60 virtual void Observe(NotificationType type,
56 const NotificationSource& source, 61 const NotificationSource& source,
57 const NotificationDetails& details); 62 const NotificationDetails& details);
58 63
59 // To be called after the extension service is ready; gets loaded extensions 64 // To be called after the extension service is ready; gets loaded extensions
60 // from the extension service and their saved order from the pref service 65 // from the extension service and their saved order from the pref service
61 // and constructs |toolitems_| from these data. 66 // and constructs |toolitems_| from these data.
62 void InitializeExtensionList(); 67 void InitializeExtensionList();
(...skipping 16 matching lines...) Expand all
79 // Keeps track of what the last extension to get disabled was. 84 // Keeps track of what the last extension to get disabled was.
80 std::string last_extension_removed_; 85 std::string last_extension_removed_;
81 86
82 // Keeps track of where the last extension to get disabled was in the list. 87 // Keeps track of where the last extension to get disabled was in the list.
83 size_t last_extension_removed_index_; 88 size_t last_extension_removed_index_;
84 89
85 NotificationRegistrar registrar_; 90 NotificationRegistrar registrar_;
86 }; 91 };
87 92
88 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ 93 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | chrome/browser/extensions/extension_toolbar_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698