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

Unified Diff: ui/web_dialogs/constrained_web_dialog_ui.h

Issue 10448066: Move the web dialogs code to src/ui/web_dialogs from src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/web_dialogs/DEPS ('k') | ui/web_dialogs/constrained_web_dialog_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/web_dialogs/constrained_web_dialog_ui.h
diff --git a/chrome/browser/ui/webui/constrained_web_dialog_ui.h b/ui/web_dialogs/constrained_web_dialog_ui.h
similarity index 67%
rename from chrome/browser/ui/webui/constrained_web_dialog_ui.h
rename to ui/web_dialogs/constrained_web_dialog_ui.h
index 96b68af007ed8b8aca22023f5b79ca2dd427038e..4673dacf394f2a776c41b15aa1c47e2b91b7c577 100644
--- a/chrome/browser/ui/webui/constrained_web_dialog_ui.h
+++ b/ui/web_dialogs/constrained_web_dialog_ui.h
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_
-#define CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_
+#ifndef UI_WEB_DIALOGS_CONSTRAINED_WEB_DIALOG_UI_H_
+#define UI_WEB_DIALOGS_CONSTRAINED_WEB_DIALOG_UI_H_
#pragma once
#include "base/compiler_specific.h"
#include "content/public/browser/web_ui_controller.h"
+#include "ui/web_dialogs/web_dialogs_export.h"
class ConstrainedWindow;
class Profile;
class TabContentsWrapper;
-class WebDialogDelegate;
class WebDialogWebContentsDelegate;
namespace base {
@@ -23,7 +23,10 @@ namespace content {
class RenderViewHost;
}
-class ConstrainedWebDialogDelegate {
+namespace ui {
+class WebDialogDelegate;
+
+class WEB_DIALOGS_EXPORT ConstrainedWebDialogDelegate {
public:
virtual const WebDialogDelegate* GetWebDialogDelegate() const = 0;
virtual WebDialogDelegate* GetWebDialogDelegate() = 0;
@@ -55,7 +58,8 @@ class ConstrainedWebDialogDelegate {
// implementations, this class is just a factory stub.
// TODO(thestig) Refactor the platform-independent code out of the
// platform-specific implementations.
-class ConstrainedWebDialogUI : public content::WebUIController {
+class WEB_DIALOGS_EXPORT ConstrainedWebDialogUI
+ : public content::WebUIController {
public:
explicit ConstrainedWebDialogUI(content::WebUI* web_ui);
virtual ~ConstrainedWebDialogUI();
@@ -64,22 +68,6 @@ class ConstrainedWebDialogUI : public content::WebUIController {
virtual void RenderViewCreated(
content::RenderViewHost* render_view_host) OVERRIDE;
- // Create a constrained HTML dialog. The actual object that gets created
- // is a ConstrainedWebDialogDelegate, which later triggers construction of a
- // ConstrainedWebDialogUI object.
- // |profile| is used to construct the constrained HTML dialog's WebContents.
- // |delegate| controls the behavior of the dialog.
- // |tab_delegate| is optional, pass one in to use a custom
- // WebDialogWebContentsDelegate with the dialog, or NULL to
- // use the default one. The dialog takes ownership of
- // |tab_delegate|.
- // |overshadowed| is the tab being overshadowed by the dialog.
- static ConstrainedWebDialogDelegate* CreateConstrainedWebDialog(
- Profile* profile,
- WebDialogDelegate* delegate,
- WebDialogWebContentsDelegate* tab_delegate,
- TabContentsWrapper* overshadowed);
-
// Returns a property accessor that can be used to set the
// ConstrainedWebDialogDelegate property on a WebContents.
static base::PropertyAccessor<ConstrainedWebDialogDelegate*>&
@@ -97,4 +85,22 @@ class ConstrainedWebDialogUI : public content::WebUIController {
DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogUI);
};
-#endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_
+// Create a constrained HTML dialog. The actual object that gets created
+// is a ConstrainedWebDialogDelegate, which later triggers construction of a
+// ConstrainedWebDialogUI object.
+// |profile| is used to construct the constrained HTML dialog's WebContents.
+// |delegate| controls the behavior of the dialog.
+// |tab_delegate| is optional, pass one in to use a custom
+// WebDialogWebContentsDelegate with the dialog, or NULL to
+// use the default one. The dialog takes ownership of
+// |tab_delegate|.
+// |overshadowed| is the tab being overshadowed by the dialog.
+ConstrainedWebDialogDelegate* CreateConstrainedWebDialog(
+ Profile* profile,
+ WebDialogDelegate* delegate,
+ WebDialogWebContentsDelegate* tab_delegate,
+ TabContentsWrapper* overshadowed);
+
+} // namespace ui
+
+#endif // UI_WEB_DIALOGS_CONSTRAINED_WEB_DIALOG_UI_H_
« no previous file with comments | « ui/web_dialogs/DEPS ('k') | ui/web_dialogs/constrained_web_dialog_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698