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

Unified Diff: chrome/browser/ui/web_contents_modal_dialog_manager.h

Issue 12045037: Refactor modality-specific behavior from ConstrainedWindowViews to WebContentsModalDialogManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Android link error Created 7 years, 10 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/web_contents_modal_dialog_manager.h
diff --git a/chrome/browser/ui/web_contents_modal_dialog_manager.h b/chrome/browser/ui/web_contents_modal_dialog_manager.h
index 3a392d493ac253c142ed361bea3dd4106dc2fb2a..93840953947bef594cc8631c8e82d7e5207d7067 100644
--- a/chrome/browser/ui/web_contents_modal_dialog_manager.h
+++ b/chrome/browser/ui/web_contents_modal_dialog_manager.h
@@ -7,8 +7,11 @@
#include <deque>
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/ui/native_web_contents_modal_dialog_manager.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
+#include "ui/gfx/native_widget_types.h"
class WebContentsModalDialog;
class WebContentsModalDialogManagerDelegate;
@@ -23,6 +26,9 @@ class WebContentsModalDialogManager
WebContentsModalDialogManagerDelegate* delegate() const { return delegate_; }
void set_delegate(WebContentsModalDialogManagerDelegate* d) { delegate_ = d; }
+ static NativeWebContentsModalDialogManager* CreateNativeManager(
+ WebContentsModalDialogManager* manager);
+
// Adds the given dialog to the list of child dialogs. The dialog will notify
// via WillClose() when it is being destroyed.
void AddDialog(WebContentsModalDialog* dialog);
@@ -47,6 +53,9 @@ class WebContentsModalDialogManager
: manager_(manager) {}
void CloseAllDialogs() { manager_->CloseAllDialogs(); }
+ void ResetNativeManager(NativeWebContentsModalDialogManager* delegate) {
+ manager_->native_manager_.reset(delegate);
+ }
private:
WebContentsModalDialogManager* manager_;
@@ -86,6 +95,9 @@ class WebContentsModalDialogManager
// Delegate for notifying our owner about stuff. Not owned by us.
WebContentsModalDialogManagerDelegate* delegate_;
+ // Delegate for native UI-specific functions on the dialog.
+ scoped_ptr<NativeWebContentsModalDialogManager> native_manager_;
+
// All active dialogs.
WebContentsModalDialogList child_dialogs_;
« no previous file with comments | « chrome/browser/ui/views/web_intent_picker_views.cc ('k') | chrome/browser/ui/web_contents_modal_dialog_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698