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

Unified Diff: content/browser/javascript_dialog_delegate.h

Issue 7096016: Remove JS dialog dependency from content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more DEPS item removal Created 9 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
Index: content/browser/javascript_dialog_delegate.h
diff --git a/content/browser/javascript_dialog_delegate.h b/content/browser/javascript_dialog_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..e40f63e5777464ac1c907587f136dc458f507cfc
--- /dev/null
+++ b/content/browser/javascript_dialog_delegate.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_JAVASCRIPT_DIALOG_DELEGATE_H_
+#define CONTENT_BROWSER_JAVASCRIPT_DIALOG_DELEGATE_H_
+#pragma once
+
+#include "ui/gfx/native_widget_types.h"
+
+class ExtensionHost;
+class TabContents;
+
+namespace IPC {
+class Message;
+}
+
+namespace content {
+
+class JavaScriptDialogDelegate {
+ public:
+ // This callback is invoked when the dialog is closed.
+ virtual void OnDialogClosed(IPC::Message* reply_msg,
+ bool success,
+ const string16& user_input) = 0;
+
+ // Returns the root native window with which to associate the dialog.
+ virtual gfx::NativeWindow GetDialogRootWindow() = 0;
+
+ // Returns the TabContents implementing this delegate, or NULL if there is
+ // none. TODO(avi): This breaks encapsulation and in general sucks; figure out
+ // a better way of doing this.
+ virtual TabContents* AsTabContents() = 0;
+
+ // Returns the ExtensionHost implementing this delegate, or NULL if there is
+ // none. TODO(avi): This is even suckier than AsTabContents above as it breaks
+ // layering; figure out a better way of doing this. http://crbug.com/84604
+ virtual ExtensionHost* AsExtensionHost() = 0;
+
+ protected:
+ virtual ~JavaScriptDialogDelegate() {}
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_JAVASCRIPT_DIALOG_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698