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

Side by Side Diff: chrome/browser/ui/webui/html_dialog_ui.h

Issue 9382037: Move ContextMenuParams struct from webkit/glue to content/public/common. The reasons are: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac 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_contents_delegate.h"
15 #include "content/public/browser/web_ui_controller.h" 15 #include "content/public/browser/web_ui_controller.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 #include "ui/base/ui_base_types.h" 17 #include "ui/base/ui_base_types.h"
18 18
19 struct ContextMenuParams;
20 19
21 namespace base { 20 namespace base {
22 class ListValue; 21 class ListValue;
23 template<class T> class PropertyAccessor; 22 template<class T> class PropertyAccessor;
24 } 23 }
25 24
26 namespace content { 25 namespace content {
27 class WebContents; 26 class WebContents;
28 class WebUIMessageHandler; 27 class WebUIMessageHandler;
28 struct ContextMenuParams;
29 } 29 }
30 30
31 namespace gfx { 31 namespace gfx {
32 class Size; 32 class Size;
33 } 33 }
34 34
35 // Implement this class to receive notifications. 35 // Implement this class to receive notifications.
36 class HtmlDialogUIDelegate { 36 class HtmlDialogUIDelegate {
37 public: 37 public:
38 // Returns true if the contents needs to be run in a modal dialog. 38 // Returns true if the contents needs to be run in a modal dialog.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 bool* out_close_dialog) = 0; 75 bool* out_close_dialog) = 0;
76 76
77 // A callback to allow the delegate to dictate that the window should not 77 // A callback to allow the delegate to dictate that the window should not
78 // have a title bar. This is useful when presenting branded interfaces. 78 // have a title bar. This is useful when presenting branded interfaces.
79 virtual bool ShouldShowDialogTitle() const = 0; 79 virtual bool ShouldShowDialogTitle() const = 0;
80 80
81 // A callback to allow the delegate to inhibit context menu or show 81 // A callback to allow the delegate to inhibit context menu or show
82 // customized menu. 82 // customized menu.
83 // Returns true iff you do NOT want the standard context menu to be 83 // Returns true iff you do NOT want the standard context menu to be
84 // shown (because you want to handle it yourself). 84 // shown (because you want to handle it yourself).
85 virtual bool HandleContextMenu(const ContextMenuParams& params); 85 virtual bool HandleContextMenu(const content::ContextMenuParams& params);
86 86
87 // A callback to allow the delegate to open a new URL inside |source|. 87 // A callback to allow the delegate to open a new URL inside |source|.
88 // On return |out_new_contents| should contain the WebContents the URL 88 // On return |out_new_contents| should contain the WebContents the URL
89 // is opened in. Return false to use the default handler. 89 // is opened in. Return false to use the default handler.
90 virtual bool HandleOpenURLFromTab(content::WebContents* source, 90 virtual bool HandleOpenURLFromTab(content::WebContents* source,
91 const content::OpenURLParams& params, 91 const content::OpenURLParams& params,
92 content::WebContents** out_new_contents); 92 content::WebContents** out_new_contents);
93 93
94 // A callback to create a new tab with |new_contents|. |source| is the 94 // A callback to create a new tab with |new_contents|. |source| is the
95 // WebContent where the operation originated. |disposition| controls how the 95 // WebContent where the operation originated. |disposition| controls how the
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // Intended to be the place to collect the settings and lockdowns 158 // Intended to be the place to collect the settings and lockdowns
159 // necessary for running external UI components securely (e.g., the 159 // necessary for running external UI components securely (e.g., the
160 // cloud print dialog). 160 // cloud print dialog).
161 class ExternalHtmlDialogUI : public HtmlDialogUI { 161 class ExternalHtmlDialogUI : public HtmlDialogUI {
162 public: 162 public:
163 explicit ExternalHtmlDialogUI(content::WebUI* web_ui); 163 explicit ExternalHtmlDialogUI(content::WebUI* web_ui);
164 virtual ~ExternalHtmlDialogUI(); 164 virtual ~ExternalHtmlDialogUI();
165 }; 165 };
166 166
167 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_ 167 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698