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

Side by Side Diff: chrome/browser/ui/webui/signin/sync_confirmation_ui.h

Issue 2784823002: Reland "Use the same browser instance in the sync confirmation dialog. (Closed)
Patch Set: Rebase and fix conflicts Created 3 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SIGNIN_SYNC_CONFIRMATION_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_SYNC_CONFIRMATION_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_SYNC_CONFIRMATION_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_SYNC_CONFIRMATION_UI_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/web_dialogs/web_dialog_ui.h" 11 #include "ui/web_dialogs/web_dialog_ui.h"
12 12
13 class SyncConfirmationHandler; 13 class SyncConfirmationHandler;
14 14
15 namespace ui { 15 namespace ui {
16 class WebUI; 16 class WebUI;
17 } 17 }
18 18
19 class Browser;
20
21 // WebUI controller for the sync confirmation dialog.
22 //
23 // Note: This controller does not set the WebUI message handler. It is
24 // the responsability of the caller to pass the correct message handler.
19 class SyncConfirmationUI : public ui::WebDialogUI { 25 class SyncConfirmationUI : public ui::WebDialogUI {
20 public: 26 public:
21 explicit SyncConfirmationUI(content::WebUI* web_ui); 27 explicit SyncConfirmationUI(content::WebUI* web_ui);
22 // Used to inject a SyncConfirmationHandler in tests.
23 SyncConfirmationUI(content::WebUI* web_ui,
24 std::unique_ptr<SyncConfirmationHandler> handler);
25 ~SyncConfirmationUI() override {} 28 ~SyncConfirmationUI() override {}
26 29
30 // Initializes a SyncConfirmationHandler for |browser| and adds it to
31 // |web_ui()|.
32 void InitializeMessageHandlerWithBrowser(Browser* browser);
33
27 DISALLOW_COPY_AND_ASSIGN(SyncConfirmationUI); 34 DISALLOW_COPY_AND_ASSIGN(SyncConfirmationUI);
28 }; 35 };
29 36
30 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_SYNC_CONFIRMATION_UI_H_ 37 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_SYNC_CONFIRMATION_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698