OLD | NEW |
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_UI_WEBUI_SYNC_SETUP_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/net/gaia/gaia_oauth_consumer.h" | 9 #include "chrome/browser/net/gaia/gaia_oauth_consumer.h" |
10 #include "chrome/browser/net/gaia/gaia_oauth_fetcher.h" | 10 #include "chrome/browser/net/gaia/gaia_oauth_fetcher.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 void HandleSubmitAuth(const base::ListValue* args); | 74 void HandleSubmitAuth(const base::ListValue* args); |
75 void HandleConfigure(const base::ListValue* args); | 75 void HandleConfigure(const base::ListValue* args); |
76 void HandlePassphraseEntry(const base::ListValue* args); | 76 void HandlePassphraseEntry(const base::ListValue* args); |
77 void HandlePassphraseCancel(const base::ListValue* args); | 77 void HandlePassphraseCancel(const base::ListValue* args); |
78 void HandleAttachHandler(const base::ListValue* args); | 78 void HandleAttachHandler(const base::ListValue* args); |
79 void HandleShowErrorUI(const base::ListValue* args); | 79 void HandleShowErrorUI(const base::ListValue* args); |
80 void HandleShowSetupUI(const base::ListValue* args); | 80 void HandleShowSetupUI(const base::ListValue* args); |
81 | 81 |
82 SyncSetupFlow* flow() { return flow_; } | 82 SyncSetupFlow* flow() { return flow_; } |
83 | 83 |
| 84 // Subclasses must implement to step the SyncSetupWizard to the correct state |
| 85 // before showing the Setup UI. |
| 86 virtual void StepWizardForShowSetupUI() = 0; |
| 87 |
84 // Subclasses must implement this to show the setup UI that's appropriate | 88 // Subclasses must implement this to show the setup UI that's appropriate |
85 // for the page this is contained in. | 89 // for the page this is contained in. |
86 virtual void ShowSetupUI() = 0; | 90 virtual void ShowSetupUI() = 0; |
87 | 91 |
88 private: | 92 private: |
89 // If a wizard already exists, focus it and return true. | 93 // If a wizard already exists, focus it and return true. |
90 bool FocusExistingWizard(); | 94 bool FocusExistingWizard(); |
91 | 95 |
92 // Invokes the javascript call to close the setup overlay. | 96 // Invokes the javascript call to close the setup overlay. |
93 void CloseOverlay(); | 97 void CloseOverlay(); |
(...skipping 10 matching lines...) Expand all Loading... |
104 // Weak reference. | 108 // Weak reference. |
105 SyncSetupFlow* flow_; | 109 SyncSetupFlow* flow_; |
106 scoped_ptr<GaiaOAuthFetcher> oauth_login_; | 110 scoped_ptr<GaiaOAuthFetcher> oauth_login_; |
107 // Weak reference to the profile manager. | 111 // Weak reference to the profile manager. |
108 ProfileManager* const profile_manager_; | 112 ProfileManager* const profile_manager_; |
109 | 113 |
110 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); | 114 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); |
111 }; | 115 }; |
112 | 116 |
113 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_ | 117 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_SETUP_HANDLER_H_ |
OLD | NEW |