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

Side by Side Diff: chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.h

Issue 9692021: Revert 126256 - Show a different icon in the launcher for incognito windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_LAUNCHER_CHROME_LAUNCHER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_LAUNCHER_CHROME_LAUNCHER_DELEGATE_H_
6 #define CHROME_BROWSER_UI_VIEWS_ASH_LAUNCHER_CHROME_LAUNCHER_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_ASH_LAUNCHER_CHROME_LAUNCHER_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 25 matching lines...) Expand all
36 public ash::LauncherModelObserver, 36 public ash::LauncherModelObserver,
37 public content::NotificationObserver { 37 public content::NotificationObserver {
38 public: 38 public:
39 // Indicates what should happen when the app is launched. 39 // Indicates what should happen when the app is launched.
40 enum AppType { 40 enum AppType {
41 APP_TYPE_WINDOW, 41 APP_TYPE_WINDOW,
42 APP_TYPE_PANEL, 42 APP_TYPE_PANEL,
43 APP_TYPE_TAB 43 APP_TYPE_TAB
44 }; 44 };
45 45
46 // Indicates if a launcher item is incognito or not.
47 enum IncognitoState {
48 STATE_INCOGNITO,
49 STATE_NOT_INCOGNITO,
50 };
51
52 // Interface used to load app icons. This is in it's own class so that it can 46 // Interface used to load app icons. This is in it's own class so that it can
53 // be mocked. 47 // be mocked.
54 class AppIconLoader { 48 class AppIconLoader {
55 public: 49 public:
56 virtual ~AppIconLoader() {} 50 virtual ~AppIconLoader() {}
57 51
58 // Returns the app id of the specified tab, or an empty string if there is 52 // Returns the app id of the specified tab, or an empty string if there is
59 // no app. 53 // no app.
60 virtual std::string GetAppID(TabContentsWrapper* tab) = 0; 54 virtual std::string GetAppID(TabContentsWrapper* tab) = 0;
61 55
(...skipping 12 matching lines...) Expand all
74 // Initializes this ChromeLauncherDelegate. 68 // Initializes this ChromeLauncherDelegate.
75 void Init(); 69 void Init();
76 70
77 // Returns the single ChromeLauncherDelegate instnace. 71 // Returns the single ChromeLauncherDelegate instnace.
78 static ChromeLauncherDelegate* instance() { return instance_; } 72 static ChromeLauncherDelegate* instance() { return instance_; }
79 73
80 // Registers the prefs used by ChromeLauncherDelegate. 74 // Registers the prefs used by ChromeLauncherDelegate.
81 static void RegisterUserPrefs(PrefService* user_prefs); 75 static void RegisterUserPrefs(PrefService* user_prefs);
82 76
83 // Creates a new tabbed item on the launcher for |updater|. 77 // Creates a new tabbed item on the launcher for |updater|.
84 ash::LauncherID CreateTabbedLauncherItem(LauncherUpdater* updater, 78 ash::LauncherID CreateTabbedLauncherItem(LauncherUpdater* updater);
85 IncognitoState is_incognito);
86 79
87 // Creates a new app item on the launcher for |updater|. If there is an 80 // Creates a new app item on the launcher for |updater|. If there is an
88 // existing pinned app that isn't running on the launcher, its id is returned. 81 // existing pinned app that isn't running on the launcher, its id is returned.
89 ash::LauncherID CreateAppLauncherItem(LauncherUpdater* updater, 82 ash::LauncherID CreateAppLauncherItem(LauncherUpdater* updater,
90 const std::string& app_id, 83 const std::string& app_id,
91 AppType app_type, 84 AppType app_type,
92 ash::LauncherItemStatus status); 85 ash::LauncherItemStatus status);
93 86
94 // Updates the running status of an item. 87 // Updates the running status of an item.
95 void SetItemStatus(ash::LauncherID id, ash::LauncherItemStatus status); 88 void SetItemStatus(ash::LauncherID id, ash::LauncherItemStatus status);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 223
231 // Used to load the image for an app tab. 224 // Used to load the image for an app tab.
232 scoped_ptr<AppIconLoader> app_icon_loader_; 225 scoped_ptr<AppIconLoader> app_icon_loader_;
233 226
234 content::NotificationRegistrar registrar_; 227 content::NotificationRegistrar registrar_;
235 228
236 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherDelegate); 229 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherDelegate);
237 }; 230 };
238 231
239 #endif // CHROME_BROWSER_UI_VIEWS_ASH_LAUNCHER_CHROME_LAUNCHER_DELEGATE_H_ 232 #endif // CHROME_BROWSER_UI_VIEWS_ASH_LAUNCHER_CHROME_LAUNCHER_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/launcher/tabbed_launcher_button.cc ('k') | chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698