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

Unified Diff: ash/launcher/tabbed_launcher_button.h

Issue 9649013: Show a different icon in the launcher for incognito windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Re-upload 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | ash/launcher/tabbed_launcher_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/tabbed_launcher_button.h
diff --git a/ash/launcher/tabbed_launcher_button.h b/ash/launcher/tabbed_launcher_button.h
index 625c1c6db8116075dfff1fa8fbc432f9f411b8c4..544ceb2751ec3ba3f821620516952880b58639df 100644
--- a/ash/launcher/tabbed_launcher_button.h
+++ b/ash/launcher/tabbed_launcher_button.h
@@ -18,13 +18,23 @@ class MultiAnimation;
}
namespace ash {
+
+class LauncherItem;
+
namespace internal {
// Button used for items on the launcher corresponding to tabbed windows.
class TabbedLauncherButton : public LauncherButton {
public:
+ // Indicates if this button is incognito or not.
+ enum IncognitoState {
+ STATE_INCOGNITO,
+ STATE_NOT_INCOGNITO,
+ };
+
static TabbedLauncherButton* Create(views::ButtonListener* listener,
- LauncherButtonHost* host);
+ LauncherButtonHost* host,
+ IncognitoState is_incognito);
virtual ~TabbedLauncherButton();
// Notification that the images are about to change. Kicks off an animation.
@@ -35,7 +45,8 @@ class TabbedLauncherButton : public LauncherButton {
protected:
TabbedLauncherButton(views::ButtonListener* listener,
- LauncherButtonHost* host);
+ LauncherButtonHost* host,
+ IncognitoState is_incognito);
// View override.
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
@@ -47,7 +58,7 @@ class TabbedLauncherButton : public LauncherButton {
class IconView : public LauncherButton::IconView,
public ui::AnimationDelegate {
public:
- explicit IconView(TabbedLauncherButton* host);
+ IconView(TabbedLauncherButton* host, IncognitoState is_incognito);
virtual ~IconView();
// ui::AnimationDelegateImpl overrides:
@@ -78,8 +89,10 @@ class TabbedLauncherButton : public LauncherButton {
// Background images. Which one is chosen depends on the type of the window.
static SkBitmap* browser_image_;
+ static SkBitmap* incognito_browser_image_;
// TODO[dave] implement panel specific image.
static SkBitmap* browser_panel_image_;
+ static SkBitmap* incognito_browser_panel_image_;
DISALLOW_COPY_AND_ASSIGN(IconView);
};
@@ -88,6 +101,10 @@ class TabbedLauncherButton : public LauncherButton {
return static_cast<IconView*>(icon_view());
}
+ // Indicates if the tabbed browser associated with this is an incognito
+ // window.
+ const IncognitoState is_incognito_;
+
DISALLOW_COPY_AND_ASSIGN(TabbedLauncherButton);
};
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | ash/launcher/tabbed_launcher_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698