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

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

Issue 3201003: Fixed error message bubbles according to the latest mocks (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Comments resolved Created 10 years, 4 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
« no previous file with comments | « chrome/browser/chromeos/login/helper.cc ('k') | chrome/browser/chromeos/login/login_screen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_LOGIN_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_SCREEN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/ref_counted.h" 11 #include "base/ref_counted.h"
12 #include "chrome/browser/chromeos/login/authenticator.h" 12 #include "chrome/browser/chromeos/login/authenticator.h"
13 #include "chrome/browser/chromeos/login/login_status_consumer.h" 13 #include "chrome/browser/chromeos/login/login_status_consumer.h"
14 #include "chrome/browser/chromeos/login/message_bubble.h"
14 #include "chrome/browser/chromeos/login/new_user_view.h" 15 #include "chrome/browser/chromeos/login/new_user_view.h"
15 #include "chrome/browser/chromeos/login/view_screen.h" 16 #include "chrome/browser/chromeos/login/view_screen.h"
16 #include "chrome/browser/views/info_bubble.h"
17 17
18 namespace chromeos { 18 namespace chromeos {
19 19
20 class MessageBubble; 20 class MessageBubble;
21 21
22 class LoginScreen : public ViewScreen<NewUserView>, 22 class LoginScreen : public ViewScreen<NewUserView>,
23 public NewUserView::Delegate, 23 public NewUserView::Delegate,
24 public LoginStatusConsumer, 24 public LoginStatusConsumer,
25 public InfoBubbleDelegate { 25 public MessageBubbleDelegate {
26 public: 26 public:
27 explicit LoginScreen(WizardScreenDelegate* delegate); 27 explicit LoginScreen(WizardScreenDelegate* delegate);
28 virtual ~LoginScreen(); 28 virtual ~LoginScreen();
29 29
30 bool IsErrorShown() { 30 bool IsErrorShown() {
31 return bubble_ != NULL; 31 return bubble_ != NULL;
32 } 32 }
33 33
34 // NewUserView::Delegate: 34 // NewUserView::Delegate:
35 virtual void OnLogin(const std::string& username, 35 virtual void OnLogin(const std::string& username,
(...skipping 10 matching lines...) Expand all
46 const GaiaAuthConsumer::ClientLoginResult& credentials); 46 const GaiaAuthConsumer::ClientLoginResult& credentials);
47 virtual void OnOffTheRecordLoginSuccess(); 47 virtual void OnOffTheRecordLoginSuccess();
48 48
49 // Overridden from views::InfoBubbleDelegate. 49 // Overridden from views::InfoBubbleDelegate.
50 virtual void InfoBubbleClosing(InfoBubble* info_bubble, 50 virtual void InfoBubbleClosing(InfoBubble* info_bubble,
51 bool closed_by_escape) { 51 bool closed_by_escape) {
52 bubble_ = NULL; 52 bubble_ = NULL;
53 } 53 }
54 virtual bool CloseOnEscape() { return true; } 54 virtual bool CloseOnEscape() { return true; }
55 virtual bool FadeInOnShow() { return false; } 55 virtual bool FadeInOnShow() { return false; }
56 virtual void OnHelpLinkActivated();
56 57
57 private: 58 private:
58 // ViewScreen<NewUserView>: 59 // ViewScreen<NewUserView>:
59 virtual NewUserView* AllocateView(); 60 virtual NewUserView* AllocateView();
60 61
61 // Adds start url to command line. 62 // Adds start url to command line.
62 void AppendStartUrlToCmdline(); 63 void AppendStartUrlToCmdline();
63 64
64 // Shows error message with the specified message id. 65 // Shows error message with the specified message id.
65 // If |details| string is not empty, it specify additional error text 66 // If |details| string is not empty, it specify additional error text
66 // provided by authenticator, it is not localized. 67 // provided by authenticator, it is not localized.
67 void ShowError(int error_id, const std::string& details); 68 void ShowError(int error_id, const std::string& details);
68 69
69 // Pointer to shown message bubble. We don't need to delete it because 70 // Pointer to shown message bubble. We don't need to delete it because
70 // it will be deleted on bubble closing. 71 // it will be deleted on bubble closing.
71 MessageBubble* bubble_; 72 MessageBubble* bubble_;
72 73
73 scoped_refptr<Authenticator> authenticator_; 74 scoped_refptr<Authenticator> authenticator_;
74 75
75 // URL that will be opened on browser startup. 76 // URL that will be opened on browser startup.
76 GURL start_url_; 77 GURL start_url_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(LoginScreen); 79 DISALLOW_COPY_AND_ASSIGN(LoginScreen);
79 }; 80 };
80 81
81 } // namespace chromeos 82 } // namespace chromeos
82 83
83 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_SCREEN_H_ 84 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_SCREEN_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/helper.cc ('k') | chrome/browser/chromeos/login/login_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698