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

Side by Side 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: 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
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 ASH_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_ 5 #ifndef ASH_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_
6 #define ASH_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_ 6 #define ASH_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/timer.h" 10 #include "base/timer.h"
(...skipping 14 matching lines...) Expand all
25 class TabbedLauncherButton : public views::ImageButton { 25 class TabbedLauncherButton : public views::ImageButton {
26 public: 26 public:
27 TabbedLauncherButton(views::ButtonListener* listener, 27 TabbedLauncherButton(views::ButtonListener* listener,
28 LauncherButtonHost* host); 28 LauncherButtonHost* host);
29 virtual ~TabbedLauncherButton(); 29 virtual ~TabbedLauncherButton();
30 30
31 // Notification that the images are about to change. Kicks off an animation. 31 // Notification that the images are about to change. Kicks off an animation.
32 void PrepareForImageChange(); 32 void PrepareForImageChange();
33 33
34 // Sets the images to display for this entry. 34 // Sets the images to display for this entry.
35 void SetTabImage(const SkBitmap& image, int count); 35 void SetTabImage(const SkBitmap& image, int count, bool private_tab);
36 36
37 protected: 37 protected:
38 // View overrides: 38 // View overrides:
39 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 39 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
40 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; 40 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
41 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; 41 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
42 virtual void OnMouseCaptureLost() OVERRIDE; 42 virtual void OnMouseCaptureLost() OVERRIDE;
43 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; 43 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE;
44 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; 44 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE;
45 virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; 45 virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 AnimationDelegateImpl animation_delegate_; 83 AnimationDelegateImpl animation_delegate_;
84 84
85 // Used to animate image. 85 // Used to animate image.
86 scoped_ptr<ui::MultiAnimation> animation_; 86 scoped_ptr<ui::MultiAnimation> animation_;
87 87
88 // Should |images_| be shown? This is set to false soon after 88 // Should |images_| be shown? This is set to false soon after
89 // PrepareForImageChange() is invoked without a following call to SetImages(). 89 // PrepareForImageChange() is invoked without a following call to SetImages().
90 bool show_image_; 90 bool show_image_;
91 91
92 // Background images. Which one is chosen depends upon how many images are 92 // Background images. Which one is chosen depends upon how many images are
93 // provided. 93 // provided and if the tab is private.
oshima 2012/03/09 17:54:02 browser window is incognito (or off the record).
Zachary Kuznia 2012/03/09 22:17:35 Done.
94 static ImageSet* bg_image_1_; 94 static ImageSet* bg_image_1_;
95 static ImageSet* bg_image_2_; 95 static ImageSet* bg_image_2_;
96 static ImageSet* bg_image_3_; 96 static ImageSet* bg_image_3_;
97 97
98 static ImageSet* bg_private_image_1_;
99 static ImageSet* bg_private_image_2_;
100 static ImageSet* bg_private_image_3_;
101
98 views::GlowHoverController hover_controller_; 102 views::GlowHoverController hover_controller_;
99 103
100 DISALLOW_COPY_AND_ASSIGN(TabbedLauncherButton); 104 DISALLOW_COPY_AND_ASSIGN(TabbedLauncherButton);
101 }; 105 };
102 106
103 } // namespace internal 107 } // namespace internal
104 } // namespace ash 108 } // namespace ash
105 109
106 #endif // ASH_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_ 110 #endif // ASH_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698