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

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

Issue 5709001: Place the spinner in the right corner of the controls window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/chromeos/login
Patch Set: Merged with trunk. Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_GUEST_USER_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_GUEST_USER_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_GUEST_USER_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_GUEST_USER_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/chromeos/login/user_input.h"
9 #include "views/accelerator.h" 10 #include "views/accelerator.h"
10 #include "views/controls/button/native_button.h" 11 #include "views/controls/button/native_button.h"
11 #include "views/controls/textfield/textfield.h" 12 #include "views/controls/textfield/textfield.h"
12 #include "views/view.h" 13 #include "views/view.h"
13 14
14 namespace chromeos { 15 namespace chromeos {
15 16
16 class UserController; 17 class UserController;
17 18
18 // This view is for controls window of Guest mode pod that allows user to 19 // This view is for controls window of Guest mode pod that allows user to
19 // get temporary profile and use it for browsing. Contains only one Sign-in 20 // get temporary profile and use it for browsing. Contains only one Sign-in
20 // button and handles different common keyboard shortcuts. 21 // button and handles different common keyboard shortcuts.
21 class GuestUserView : public views::View { 22 class GuestUserView : public UserInput,
23 public views::ButtonListener,
24 public views::View {
22 public: 25 public:
23 explicit GuestUserView(UserController* uc); 26 explicit GuestUserView(UserController* uc);
24 27
25 void RecreateFields(); 28 void RecreateFields();
26 29
27 void FocusSignInButton(); 30 void FocusSignInButton();
28 31
29 // Overridden from views::View: 32 // Overridden from views::View:
30 virtual bool AcceleratorPressed(const views::Accelerator& accelerator); 33 virtual bool AcceleratorPressed(const views::Accelerator& accelerator);
31 34
35 // Overridden from views::ButtonListener.
36 virtual void ButtonPressed(views::Button* sender, const views::Event& event);
37
38 // Implements UserInput:
whywhat 2010/12/09 16:20:18 Same here about consistent comments.
altimofeev 2010/12/10 16:37:40 Done.
39 virtual void EnableInputControls(bool enabled);
40
whywhat 2010/12/09 16:20:18 You could remove blank lines between methods.
altimofeev 2010/12/10 16:37:40 Done.
41 virtual void ClearAndFocusControls();
42
43 virtual void ClearAndFocusPassword();
44
45 virtual gfx::Rect GetControlWithErrorBounds() const;
46
47 virtual bool UseCustomBoundsForThrobber(const gfx::Size& throbber,
48 gfx::Rect* bounds) const;
49
32 private: 50 private:
33 // Overridden from views::View: 51 // Overridden from views::View:
34 virtual void OnLocaleChanged(); 52 virtual void OnLocaleChanged();
35 virtual void ViewHierarchyChanged(bool is_add, 53 virtual void ViewHierarchyChanged(bool is_add,
36 views::View* parent, 54 views::View* parent,
37 views::View* child); 55 views::View* child);
38 virtual void Layout(); 56 virtual void Layout();
39 57
40 // Button to start login. 58 // Button to start login.
41 views::NativeButton* submit_button_; 59 views::NativeButton* submit_button_;
42 60
43 UserController* user_controller_; 61 UserController* user_controller_;
44 62
45 views::Accelerator accel_enable_accessibility_; 63 views::Accelerator accel_enable_accessibility_;
46 views::Accelerator accel_login_off_the_record_; 64 views::Accelerator accel_login_off_the_record_;
47 views::Accelerator accel_previous_pod_by_arrow_; 65 views::Accelerator accel_previous_pod_by_arrow_;
48 views::Accelerator accel_previous_pod_by_tab_; 66 views::Accelerator accel_previous_pod_by_tab_;
49 views::Accelerator accel_next_pod_by_arrow_; 67 views::Accelerator accel_next_pod_by_arrow_;
50 views::Accelerator accel_next_pod_by_tab_; 68 views::Accelerator accel_next_pod_by_tab_;
51 69
52 DISALLOW_COPY_AND_ASSIGN(GuestUserView); 70 DISALLOW_COPY_AND_ASSIGN(GuestUserView);
53 }; 71 };
54 72
55 } // chromeos 73 } // chromeos
56 74
57 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_GUEST_USER_VIEW_H_ 75 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_GUEST_USER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698