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

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

Issue 10254027: chromeos: Rename LoginHtmlDialog to LoginWebDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/help_app_launcher.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) 2011 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 CHROME_BROWSER_CHROMEOS_LOGIN_HELP_APP_LAUNCHER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_HELP_APP_LAUNCHER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_HELP_APP_LAUNCHER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_HELP_APP_LAUNCHER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/chromeos/login/login_html_dialog.h" 12 #include "chrome/browser/chromeos/login/login_web_dialog.h"
13 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 // Provides help content during OOBE / login. 17 // Provides help content during OOBE / login.
18 // Based on connectivity state (offline/online) shows help topic dialog 18 // Based on connectivity state (offline/online) shows help topic dialog
19 // or launches HelpApp in BWSI mode. 19 // or launches HelpApp in BWSI mode.
20 class HelpAppLauncher : public LoginHtmlDialog::Delegate, 20 class HelpAppLauncher : public LoginWebDialog::Delegate,
21 public base::RefCountedThreadSafe<HelpAppLauncher> { 21 public base::RefCountedThreadSafe<HelpAppLauncher> {
22 public: 22 public:
23 // IDs of help topics available from HelpApp. 23 // IDs of help topics available from HelpApp.
24 enum HelpTopic { 24 enum HelpTopic {
25 // Showed on basic connectivity issues. 25 // Showed on basic connectivity issues.
26 HELP_CONNECTIVITY = 188752, 26 HELP_CONNECTIVITY = 188752,
27 // Showed at EULA screen as "Learn more" about stats/crash reports. 27 // Showed at EULA screen as "Learn more" about stats/crash reports.
28 HELP_STATS_USAGE = 183078, 28 HELP_STATS_USAGE = 183078,
29 // Showed whenever there're troubles signing in (offline case). 29 // Showed whenever there're troubles signing in (offline case).
30 HELP_CANT_ACCESS_ACCOUNT_OFFLINE = 188755, 30 HELP_CANT_ACCESS_ACCOUNT_OFFLINE = 188755,
31 // Showed whenever there're troubles signing in (online case). 31 // Showed whenever there're troubles signing in (online case).
32 HELP_CANT_ACCESS_ACCOUNT = 188036, 32 HELP_CANT_ACCESS_ACCOUNT = 188036,
33 // Showed in case when account was disabled. 33 // Showed in case when account was disabled.
34 HELP_ACCOUNT_DISABLED = 188756, 34 HELP_ACCOUNT_DISABLED = 188756,
35 // Showed in case when hosted account is used. 35 // Showed in case when hosted account is used.
36 HELP_HOSTED_ACCOUNT = 1054228, 36 HELP_HOSTED_ACCOUNT = 1054228,
37 }; 37 };
38 38
39 // Parent window is used to show dialog. 39 // Parent window is used to show dialog.
40 explicit HelpAppLauncher(gfx::NativeWindow parent_window); 40 explicit HelpAppLauncher(gfx::NativeWindow parent_window);
41 virtual ~HelpAppLauncher(); 41 virtual ~HelpAppLauncher();
42 42
43 // Shows specified help topic. 43 // Shows specified help topic.
44 void ShowHelpTopic(HelpTopic help_topic_id); 44 void ShowHelpTopic(HelpTopic help_topic_id);
45 45
46 // Returns true if the dialog is currently open. 46 // Returns true if the dialog is currently open.
47 bool is_open() const { return dialog_.get() && dialog_->is_open(); } 47 bool is_open() const { return dialog_.get() && dialog_->is_open(); }
48 48
49 protected: 49 protected:
50 // LoginHtmlDialog::Delegate implementation: 50 // LoginWebDialog::Delegate implementation:
51 virtual void OnDialogClosed() OVERRIDE {} 51 virtual void OnDialogClosed() OVERRIDE {}
52 52
53 private: 53 private:
54 // Shows help topic dialog for specified GURL. 54 // Shows help topic dialog for specified GURL.
55 void ShowHelpTopicDialog(const GURL& topic_url); 55 void ShowHelpTopicDialog(const GURL& topic_url);
56 56
57 // Dialog used to display help like "Can't access your account". 57 // Dialog used to display help like "Can't access your account".
58 scoped_ptr<LoginHtmlDialog> dialog_; 58 scoped_ptr<LoginWebDialog> dialog_;
59 59
60 // Parent window which is passed to help dialog. 60 // Parent window which is passed to help dialog.
61 gfx::NativeWindow parent_window_; 61 gfx::NativeWindow parent_window_;
62 62
63 DISALLOW_COPY_AND_ASSIGN(HelpAppLauncher); 63 DISALLOW_COPY_AND_ASSIGN(HelpAppLauncher);
64 }; 64 };
65 65
66 } // namespace chromeos 66 } // namespace chromeos
67 67
68 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELP_APP_LAUNCHER_H_ 68 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELP_APP_LAUNCHER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/help_app_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698