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

Side by Side Diff: chrome/browser/ui/webui/sync_promo/sync_promo_dialog.h

Issue 9225053: Add a blocking version of the sync promo dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 10 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_DIALOG_H_
6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_DIALOG_H_
7 #pragma once
8
9 #include "chrome/browser/ui/webui/html_dialog_ui.h"
10
11 class Profile;
12 class Browser;
13
14 // Shows the sync promo in a HTML dialog.
15 class SyncPromoDialog : public HtmlDialogUIDelegate {
16 public:
17 SyncPromoDialog(Profile* profile, GURL url);
18 virtual ~SyncPromoDialog();
19
20 // Shows the dialog and blocks until the dialog is dismissed.
21 void ShowDialog();
22
23 // Returns the browser spawned from the sync promo dialog (if any).
24 Browser* spawned_browser() { return spawned_browser_; }
Dan Beam 2012/01/30 18:10:05 () const {, possibly ^const or ^const Browser&? (I
sail 2012/01/30 21:52:36 Done.
25
26 // Returns true if the sync promo was closed.
27 bool sync_promo_was_closed() { return sync_promo_was_closed_; }
Dan Beam 2012/01/30 18:10:05 const {, ^const?
sail 2012/01/30 21:52:36 Done.
28
29 private:
30 // HtmlDialogUIDelegate:
Dan Beam 2012/01/30 18:10:05 are these all just implementing HtmlDialogUIDelega
sail 2012/01/30 21:52:36 they're just implementing
31 virtual ui::ModalType GetDialogModalType() const OVERRIDE;
32 virtual string16 GetDialogTitle() const OVERRIDE;
33 virtual GURL GetDialogContentURL() const OVERRIDE;
34 virtual void GetWebUIMessageHandlers(
35 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
36 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
37 virtual std::string GetDialogArgs() const OVERRIDE;
38 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
39 virtual void OnCloseContents(content::WebContents* source,
40 bool* out_close_dialog) OVERRIDE;
41 virtual bool ShouldShowDialogTitle() const OVERRIDE;
42 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE;
43 virtual bool HandleOpenURLFromTab(
44 content::WebContents* source,
45 const content::OpenURLParams& params,
46 content::WebContents** out_new_contents) OVERRIDE;
47 virtual bool HandleAddNewContents(content::WebContents* source,
48 content::WebContents* new_contents,
49 WindowOpenDisposition disposition,
50 const gfx::Rect& initial_pos,
51 bool user_gesture) OVERRIDE;
52
53 Profile* profile_;
Dan Beam 2012/01/30 18:10:05 if you feel it's useful, add more comments to inte
sail 2012/01/30 21:52:36 i think they're pretty straight forward, the more
54 Browser* spawned_browser_;
55 bool sync_promo_was_closed_;
56 GURL url_;
57 gfx::NativeWindow window_;
58
59 DISALLOW_COPY_AND_ASSIGN(SyncPromoDialog);
60 };
61
62 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698