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

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

Issue 9569001: WebUI TaskManager: Add method to set minimum window size on HTMLDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: prevent from failing the tests Created 8 years, 9 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
« no previous file with comments | « chrome/browser/ui/views/html_dialog_view.cc ('k') | chrome/browser/ui/webui/html_dialog_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
(...skipping 23 matching lines...) Expand all
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.
39 virtual ui::ModalType GetDialogModalType() const = 0; 39 virtual ui::ModalType GetDialogModalType() const = 0;
40 40
41 // Returns the title of the dialog. 41 // Returns the title of the dialog.
42 virtual string16 GetDialogTitle() const = 0; 42 virtual string16 GetDialogTitle() const = 0;
43 43
44 // Returns the dialog's name identifier. Used to identify this dialog for
45 // state restoration.
46 virtual std::string GetDialogName() const;
47
44 // Get the HTML file path for the content to load in the dialog. 48 // Get the HTML file path for the content to load in the dialog.
45 virtual GURL GetDialogContentURL() const = 0; 49 virtual GURL GetDialogContentURL() const = 0;
46 50
47 // Get WebUIMessageHandler objects to handle messages from the HTML/JS page. 51 // Get WebUIMessageHandler objects to handle messages from the HTML/JS page.
48 // The handlers are used to send and receive messages from the page while it 52 // The handlers are used to send and receive messages from the page while it
49 // is still open. Ownership of each handler is taken over by the WebUI 53 // is still open. Ownership of each handler is taken over by the WebUI
50 // hosting the page. 54 // hosting the page.
51 virtual void GetWebUIMessageHandlers( 55 virtual void GetWebUIMessageHandlers(
52 std::vector<content::WebUIMessageHandler*>* handlers) const = 0; 56 std::vector<content::WebUIMessageHandler*>* handlers) const = 0;
53 57
54 // Get the size of the dialog. 58 // Get the size of the dialog.
55 virtual void GetDialogSize(gfx::Size* size) const = 0; 59 virtual void GetDialogSize(gfx::Size* size) const = 0;
56 60
61 // Get the size of the dialog.
62 virtual void GetMinimumDialogSize(gfx::Size* size) const;
63
57 // Gets the JSON string input to use when showing the dialog. 64 // Gets the JSON string input to use when showing the dialog.
58 virtual std::string GetDialogArgs() const = 0; 65 virtual std::string GetDialogArgs() const = 0;
59 66
60 // A callback to notify the delegate that |source|'s loading state has 67 // A callback to notify the delegate that |source|'s loading state has
61 // changed. 68 // changed.
62 virtual void OnLoadingStateChanged(content::WebContents* source) {} 69 virtual void OnLoadingStateChanged(content::WebContents* source) {}
63 70
64 // A callback to notify the delegate that the dialog closed. 71 // A callback to notify the delegate that the dialog closed.
65 // IMPORTANT: Implementations should delete |this| here (unless they've 72 // IMPORTANT: Implementations should delete |this| here (unless they've
66 // arranged for the delegate to be deleted in some other way, e.g. by 73 // arranged for the delegate to be deleted in some other way, e.g. by
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // Intended to be the place to collect the settings and lockdowns 166 // Intended to be the place to collect the settings and lockdowns
160 // necessary for running external UI components securely (e.g., the 167 // necessary for running external UI components securely (e.g., the
161 // cloud print dialog). 168 // cloud print dialog).
162 class ExternalHtmlDialogUI : public HtmlDialogUI { 169 class ExternalHtmlDialogUI : public HtmlDialogUI {
163 public: 170 public:
164 explicit ExternalHtmlDialogUI(content::WebUI* web_ui); 171 explicit ExternalHtmlDialogUI(content::WebUI* web_ui);
165 virtual ~ExternalHtmlDialogUI(); 172 virtual ~ExternalHtmlDialogUI();
166 }; 173 };
167 174
168 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_ 175 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/html_dialog_view.cc ('k') | chrome/browser/ui/webui/html_dialog_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698