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

Unified Diff: chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h

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
Index: chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h
===================================================================
--- chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h (revision 133680)
+++ chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h (working copy)
@@ -2,44 +2,49 @@
// 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_HTML_UI_DELEGATE_IMPL_H_
-#define CHROME_BROWSER_UI_WEBUI_CONSTRAINED_HTML_UI_DELEGATE_IMPL_H_
+#ifndef CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_
+#define CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_
#pragma once
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/ui/webui/constrained_html_ui.h"
-#include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h"
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
+#include "chrome/browser/ui/webui/web_dialog_web_contents_delegate.h"
+#include "chrome/browser/ui/webui/web_dialog_ui.h"
-// Platform-agnostic base implementation of ConstrainedHtmlUIDelegate.
-class ConstrainedHtmlUIDelegateImpl : public ConstrainedHtmlUIDelegate,
- public HtmlDialogTabContentsDelegate {
+// Platform-agnostic base implementation of ConstrainedWebDialogDelegate.
+class ConstrainedWebDialogDelegateBase
+ : public ConstrainedWebDialogDelegate,
+ public WebDialogWebContentsDelegate {
public:
- ConstrainedHtmlUIDelegateImpl(Profile* profile,
- HtmlDialogUIDelegate* delegate,
- HtmlDialogTabContentsDelegate* tab_delegate);
- virtual ~ConstrainedHtmlUIDelegateImpl();
+ ConstrainedWebDialogDelegateBase(
+ Profile* profile,
+ WebDialogDelegate* delegate,
+ WebDialogWebContentsDelegate* tab_delegate);
+ virtual ~ConstrainedWebDialogDelegateBase();
void set_window(ConstrainedWindow* window);
bool closed_via_webui() const;
- // ConstrainedHtmlUIDelegate interface.
- virtual const HtmlDialogUIDelegate* GetHtmlDialogUIDelegate() const OVERRIDE;
- virtual HtmlDialogUIDelegate* GetHtmlDialogUIDelegate() OVERRIDE;
+ // ConstrainedWebDialogDelegate interface.
+ virtual const WebDialogDelegate*
+ GetWebDialogDelegate() const OVERRIDE;
+ virtual WebDialogDelegate* GetWebDialogDelegate() OVERRIDE;
virtual void OnDialogCloseFromWebUI() OVERRIDE;
virtual void ReleaseTabContentsOnDialogClose() OVERRIDE;
virtual ConstrainedWindow* window() OVERRIDE;
virtual TabContentsWrapper* tab() OVERRIDE;
- // HtmlDialogTabContentsDelegate interface.
+ // WebDialogWebContentsDelegate interface.
virtual void HandleKeyboardEvent(
const NativeWebKeyboardEvent& event) OVERRIDE;
protected:
void set_override_tab_delegate(
- HtmlDialogTabContentsDelegate* override_tab_delegate);
+ WebDialogWebContentsDelegate* override_tab_delegate);
private:
- HtmlDialogUIDelegate* html_delegate_;
+ WebDialogDelegate* web_dialog_delegate_;
// The constrained window that owns |this|. Saved so we can close it later.
ConstrainedWindow* window_;
@@ -47,16 +52,16 @@
// Holds the HTML to display in the constrained dialog.
scoped_ptr<TabContentsWrapper> tab_;
- // Was the dialog closed from WebUI (in which case |html_delegate_|'s
+ // Was the dialog closed from WebUI (in which case |web_dialog_delegate_|'s
// OnDialogClosed() method has already been called)?
bool closed_via_webui_;
// If true, release |tab_| on close instead of destroying it.
bool release_tab_on_close_;
- scoped_ptr<HtmlDialogTabContentsDelegate> override_tab_delegate_;
+ scoped_ptr<WebDialogWebContentsDelegate> override_tab_delegate_;
- DISALLOW_COPY_AND_ASSIGN(ConstrainedHtmlUIDelegateImpl);
+ DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateBase);
};
-#endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_HTML_UI_DELEGATE_IMPL_H_
+#endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_

Powered by Google App Engine
This is Rietveld 408576698