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

Unified Diff: chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc

Issue 10214001: WebDialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc ('k') | chrome/browser/ui/gtk/html_dialog_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc
===================================================================
--- chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc (revision 133680)
+++ chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc (working copy)
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/webui/constrained_html_ui_delegate_impl.h"
+#include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h"
#include "chrome/browser/ui/gtk/constrained_window_gtk.h"
#include "chrome/browser/ui/gtk/tab_contents_container_gtk.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "chrome/browser/ui/webui/html_dialog_ui.h"
+#include "chrome/browser/ui/webui/web_dialog_ui.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
@@ -16,25 +16,27 @@
using content::WebContents;
-class ConstrainedHtmlDelegateGtk : public ConstrainedWindowGtkDelegate,
- public ConstrainedHtmlUIDelegate {
+class ConstrainedWebDialogDelegateGtk : public ConstrainedWindowGtkDelegate,
+ public ConstrainedWebDialogDelegate {
public:
- ConstrainedHtmlDelegateGtk(Profile* profile,
- HtmlDialogUIDelegate* delegate,
- HtmlDialogTabContentsDelegate* tab_delegate);
+ ConstrainedWebDialogDelegateGtk(
+ Profile* profile,
+ WebDialogDelegate* delegate,
+ WebDialogWebContentsDelegate* tab_delegate);
- virtual ~ConstrainedHtmlDelegateGtk() {}
+ virtual ~ConstrainedWebDialogDelegateGtk() {}
void set_window(ConstrainedWindow* window) {
return impl_->set_window(window);
}
- // ConstrainedHtmlUIDelegate interface
- virtual const HtmlDialogUIDelegate* GetHtmlDialogUIDelegate() const OVERRIDE {
- return impl_->GetHtmlDialogUIDelegate();
+ // ConstrainedWebDialogDelegate interface
+ virtual const WebDialogDelegate*
+ GetWebDialogDelegate() const OVERRIDE {
+ return impl_->GetWebDialogDelegate();
}
- virtual HtmlDialogUIDelegate* GetHtmlDialogUIDelegate() OVERRIDE {
- return impl_->GetHtmlDialogUIDelegate();
+ virtual WebDialogDelegate* GetWebDialogDelegate() OVERRIDE {
+ return impl_->GetWebDialogDelegate();
}
virtual void OnDialogCloseFromWebUI() OVERRIDE {
return impl_->OnDialogCloseFromWebUI();
@@ -58,7 +60,7 @@
}
virtual void DeleteDelegate() OVERRIDE {
if (!impl_->closed_via_webui())
- GetHtmlDialogUIDelegate()->OnDialogClosed("");
+ GetWebDialogDelegate()->OnDialogClosed("");
delete this;
}
virtual bool GetBackgroundColor(GdkColor* color) OVERRIDE {
@@ -67,18 +69,18 @@
}
private:
- scoped_ptr<ConstrainedHtmlUIDelegateImpl> impl_;
+ scoped_ptr<ConstrainedWebDialogDelegateBase> impl_;
TabContentsContainerGtk tab_contents_container_;
- DISALLOW_COPY_AND_ASSIGN(ConstrainedHtmlDelegateGtk);
+ DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateGtk);
};
-ConstrainedHtmlDelegateGtk::ConstrainedHtmlDelegateGtk(
+ConstrainedWebDialogDelegateGtk::ConstrainedWebDialogDelegateGtk(
Profile* profile,
- HtmlDialogUIDelegate* delegate,
- HtmlDialogTabContentsDelegate* tab_delegate)
- : impl_(new ConstrainedHtmlUIDelegateImpl(profile, delegate, tab_delegate)),
+ WebDialogDelegate* delegate,
+ WebDialogWebContentsDelegate* tab_delegate)
+ : impl_(new ConstrainedWebDialogDelegateBase(profile, delegate, tab_delegate)),
tab_contents_container_(NULL) {
tab_contents_container_.SetTab(tab());
@@ -92,13 +94,14 @@
}
// static
-ConstrainedHtmlUIDelegate* ConstrainedHtmlUI::CreateConstrainedHtmlDialog(
- Profile* profile,
- HtmlDialogUIDelegate* delegate,
- HtmlDialogTabContentsDelegate* tab_delegate,
- TabContentsWrapper* overshadowed) {
- ConstrainedHtmlDelegateGtk* constrained_delegate =
- new ConstrainedHtmlDelegateGtk(profile, delegate, tab_delegate);
+ConstrainedWebDialogDelegate*
+ ConstrainedWebDialogUI::CreateConstrainedWebDialog(
+ Profile* profile,
+ WebDialogDelegate* delegate,
+ WebDialogWebContentsDelegate* tab_delegate,
+ TabContentsWrapper* overshadowed) {
+ ConstrainedWebDialogDelegateGtk* constrained_delegate =
+ new ConstrainedWebDialogDelegateGtk(profile, delegate, tab_delegate);
ConstrainedWindow* constrained_window =
new ConstrainedWindowGtk(overshadowed, constrained_delegate);
constrained_delegate->set_window(constrained_window);
« no previous file with comments | « chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc ('k') | chrome/browser/ui/gtk/html_dialog_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698