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

Side by Side Diff: chrome/browser/ui/webui/html_dialog_ui.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
1 // Copyright (c) 2012 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_UI_WEBUI_HTML_DIALOG_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "content/public/browser/web_contents_delegate.h"
14 #include "content/public/browser/web_ui_controller.h" 15 #include "content/public/browser/web_ui_controller.h"
15 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
16 #include "ui/base/ui_base_types.h" 17 #include "ui/base/ui_base_types.h"
17 18
18 struct ContextMenuParams; 19 struct ContextMenuParams;
19 20
20 namespace base { 21 namespace base {
21 class ListValue; 22 class ListValue;
22 template<class T> class PropertyAccessor; 23 template<class T> class PropertyAccessor;
23 } 24 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // A callback to allow the delegate to dictate that the window should not 73 // A callback to allow the delegate to dictate that the window should not
73 // have a title bar. This is useful when presenting branded interfaces. 74 // have a title bar. This is useful when presenting branded interfaces.
74 virtual bool ShouldShowDialogTitle() const = 0; 75 virtual bool ShouldShowDialogTitle() const = 0;
75 76
76 // A callback to allow the delegate to inhibit context menu or show 77 // A callback to allow the delegate to inhibit context menu or show
77 // customized menu. 78 // customized menu.
78 // Returns true iff you do NOT want the standard context menu to be 79 // Returns true iff you do NOT want the standard context menu to be
79 // shown (because you want to handle it yourself). 80 // shown (because you want to handle it yourself).
80 virtual bool HandleContextMenu(const ContextMenuParams& params); 81 virtual bool HandleContextMenu(const ContextMenuParams& params);
81 82
83 // A callback to allow the delegate to open a new URL inside |source|.
84 // On return |out_new_contents| should contain the WebContents the URL
85 // is opened in. Return false to use the default handler.
86 virtual bool HandleOpenURLFromTab(content::WebContents* source,
87 const content::OpenURLParams& params,
88 content::WebContents** out_new_contents);
89
90 // A callback to create a new tab with |new_contents|. Return false to use the
91 // default handler.
92 virtual bool HandleAddNewContents(content::WebContents* source,
93 content::WebContents* new_contents,
94 WindowOpenDisposition disposition,
95 const gfx::Rect& initial_pos,
96 bool user_gesture);
97
82 // Stores the dialog bounds. 98 // Stores the dialog bounds.
83 virtual void StoreDialogSize(const gfx::Size& dialog_size) {} 99 virtual void StoreDialogSize(const gfx::Size& dialog_size) {}
84 100
85 protected: 101 protected:
86 virtual ~HtmlDialogUIDelegate() {} 102 virtual ~HtmlDialogUIDelegate() {}
87 }; 103 };
88 104
89 // Displays file URL contents inside a modal HTML dialog. 105 // Displays file URL contents inside a modal HTML dialog.
90 // 106 //
91 // This application really should not use WebContents + WebUI. It should instead 107 // This application really should not use WebContents + WebUI. It should instead
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // Intended to be the place to collect the settings and lockdowns 151 // Intended to be the place to collect the settings and lockdowns
136 // necessary for running external UI components securely (e.g., the 152 // necessary for running external UI components securely (e.g., the
137 // cloud print dialog). 153 // cloud print dialog).
138 class ExternalHtmlDialogUI : public HtmlDialogUI { 154 class ExternalHtmlDialogUI : public HtmlDialogUI {
139 public: 155 public:
140 explicit ExternalHtmlDialogUI(content::WebUI* web_ui); 156 explicit ExternalHtmlDialogUI(content::WebUI* web_ui);
141 virtual ~ExternalHtmlDialogUI(); 157 virtual ~ExternalHtmlDialogUI();
142 }; 158 };
143 159
144 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_ 160 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698