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

Side by Side Diff: chrome/browser/chromeos/login/screen_lock_view.h

Issue 8557005: Rebase the MessageBubble on the new views bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on updated bubble move codereview.chromium.org/8650001. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_CHROMEOS_LOGIN_SCREEN_LOCK_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCK_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCK_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCK_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/chromeos/login/helper.h" 9 #include "chrome/browser/chromeos/login/helper.h"
10 #include "chrome/browser/chromeos/login/user_view.h" 10 #include "chrome/browser/chromeos/login/user_view.h"
(...skipping 22 matching lines...) Expand all
33 virtual ~ScreenLockView(); 33 virtual ~ScreenLockView();
34 34
35 void Init(); 35 void Init();
36 36
37 // Clears and sets the focus to the password field. 37 // Clears and sets the focus to the password field.
38 void ClearAndSetFocusToPassword(); 38 void ClearAndSetFocusToPassword();
39 39
40 // Enable/Disable signout button. 40 // Enable/Disable signout button.
41 void SetSignoutEnabled(bool enabled); 41 void SetSignoutEnabled(bool enabled);
42 42
43 // Returns the bounds of the password field in ScreenLocker's coordinate.
44 gfx::Rect GetPasswordBoundsRelativeTo(const views::View* view);
45
46 // views::View: 43 // views::View:
47 virtual void SetEnabled(bool enabled); 44 virtual void SetEnabled(bool enabled);
48 virtual void Layout(); 45 virtual void Layout();
49 virtual gfx::Size GetPreferredSize(); 46 virtual gfx::Size GetPreferredSize();
50 47
51 // content::NotificationObserver: 48 // content::NotificationObserver:
52 virtual void Observe(int type, 49 virtual void Observe(int type,
53 const content::NotificationSource& source, 50 const content::NotificationSource& source,
54 const content::NotificationDetails& details); 51 const content::NotificationDetails& details);
55 52
56 // views::TextfieldController: 53 // views::TextfieldController:
57 virtual void ContentsChanged(views::Textfield* sender, 54 virtual void ContentsChanged(views::Textfield* sender,
58 const string16& new_contents); 55 const string16& new_contents);
59 virtual bool HandleKeyEvent(views::Textfield* sender, 56 virtual bool HandleKeyEvent(views::Textfield* sender,
60 const views::KeyEvent& keystroke); 57 const views::KeyEvent& keystroke);
61 58
62 // UserView::Delegate: 59 // UserView::Delegate:
63 virtual void OnSignout(); 60 virtual void OnSignout();
64 virtual bool IsUserSelected() const; 61 virtual bool IsUserSelected() const;
65 62
63 views::Textfield* password_field() { return password_field_; }
64
66 private: 65 private:
67 friend class test::ScreenLockerTester; 66 friend class test::ScreenLockerTester;
68 67
69 UserView* user_view_; 68 UserView* user_view_;
70 69
71 // For editing the password. 70 // For editing the password.
72 views::Textfield* password_field_; 71 views::Textfield* password_field_;
73 72
74 // ScreenLocker is owned by itself. 73 // ScreenLocker is owned by itself.
75 ScreenLocker* screen_locker_; 74 ScreenLocker* screen_locker_;
76 75
77 content::NotificationRegistrar registrar_; 76 content::NotificationRegistrar registrar_;
78 77
79 // User's picture, signout button and password field. 78 // User's picture, signout button and password field.
80 views::View* main_; 79 views::View* main_;
81 80
82 // Username that overlays on top of user's picture. 81 // Username that overlays on top of user's picture.
83 views::View* username_; 82 views::View* username_;
84 83
85 DISALLOW_COPY_AND_ASSIGN(ScreenLockView); 84 DISALLOW_COPY_AND_ASSIGN(ScreenLockView);
86 }; 85 };
87 86
88 } // namespace chromeos 87 } // namespace chromeos
89 88
90 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCK_VIEW_H_ 89 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCK_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698