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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_icon.h

Issue 322253006: Password bubble: Add an "active" icon state, and a new disabled icon. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 500s. Created 6 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PASSWORDS_MANAGE_PASSWORDS_ICON_H_ 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_ICON_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_ICON_H_ 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_ICON_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "components/password_manager/core/common/password_manager_ui.h" 9 #include "components/password_manager/core/common/password_manager_ui.h"
10 10
11 // Abstract base class for platform-specific password management icon views. 11 // Abstract base class for platform-specific password management icon views.
12 class ManagePasswordsIcon { 12 class ManagePasswordsIcon {
13 public: 13 public:
14 // Get/set the icon's state. Implementations of this class must implement 14 // Get/set the icon's state. Implementations of this class must implement
15 // SetStateInternal to do reasonable platform-specific things to represent 15 // SetStateInternal to do reasonable platform-specific things to represent
16 // the icon's state to the user. 16 // the icon's state to the user.
17 void SetState(password_manager::ui::State state); 17 void SetState(password_manager::ui::State state);
18 password_manager::ui::State state() const { return state_; } 18 password_manager::ui::State state() const { return state_; }
19 19
20 void SetActive(bool active);
21 bool active() const { return active_; }
22
20 protected: 23 protected:
21 ManagePasswordsIcon(); 24 ManagePasswordsIcon();
22 ~ManagePasswordsIcon(); 25 ~ManagePasswordsIcon();
23 26
24 // Called from SetState() iff the icon's state has changed in order to do 27 // Called from SetState() iff the icon's state has changed in order to do
25 // whatever platform-specific UI work is necessary given the new state. 28 // whatever platform-specific UI work is necessary given the new state.
26 virtual void UpdateVisibleUI() = 0; 29 virtual void UpdateVisibleUI() = 0;
27 30
28 private: 31 private:
29 password_manager::ui::State state_; 32 password_manager::ui::State state_;
33 bool active_;
30 34
31 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsIcon); 35 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsIcon);
32 }; 36 };
33 37
34 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_ICON_H_ 38 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_ICON_H_
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/ui/passwords/manage_passwords_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698