OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h" | 5 #include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/memory/scoped_nsobject.h" | 9 #include "base/memory/scoped_nsobject.h" |
10 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" | 10 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" |
11 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi
ndow.h" | 11 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi
ndow.h" |
12 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" | 12 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" |
13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
14 #include "content/public/browser/web_contents_view.h" | 14 #include "content/public/browser/web_contents_view.h" |
15 #include "ui/gfx/size.h" | 15 #include "ui/gfx/size.h" |
16 #include "ui/web_dialogs/web_dialog_delegate.h" | 16 #include "ui/web_dialogs/web_dialog_delegate.h" |
17 #include "ui/web_dialogs/web_dialog_ui.h" | 17 #include "ui/web_dialogs/web_dialog_ui.h" |
18 #include "ui/web_dialogs/web_dialog_web_contents_delegate.h" | 18 #include "ui/web_dialogs/web_dialog_web_contents_delegate.h" |
19 | 19 |
20 using content::WebContents; | 20 using content::WebContents; |
21 using ui::WebDialogDelegate; | 21 using ui::WebDialogDelegate; |
22 using ui::WebDialogWebContentsDelegate; | 22 using ui::WebDialogWebContentsDelegate; |
| 23 using web_modal::NativeWebContentsModalDialog; |
23 | 24 |
24 namespace { | 25 namespace { |
25 | 26 |
26 class ConstrainedWebDialogDelegateMac | 27 class ConstrainedWebDialogDelegateMac |
27 : public ConstrainedWebDialogDelegateBase { | 28 : public ConstrainedWebDialogDelegateBase { |
28 public: | 29 public: |
29 ConstrainedWebDialogDelegateMac( | 30 ConstrainedWebDialogDelegateMac( |
30 content::BrowserContext* browser_context, | 31 content::BrowserContext* browser_context, |
31 WebDialogDelegate* delegate, | 32 WebDialogDelegate* delegate, |
32 WebDialogWebContentsDelegate* tab_delegate) | 33 WebDialogWebContentsDelegate* tab_delegate) |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 content::BrowserContext* browser_context, | 132 content::BrowserContext* browser_context, |
132 WebDialogDelegate* delegate, | 133 WebDialogDelegate* delegate, |
133 WebDialogWebContentsDelegate* tab_delegate, | 134 WebDialogWebContentsDelegate* tab_delegate, |
134 content::WebContents* web_contents) { | 135 content::WebContents* web_contents) { |
135 // Deleted when the dialog closes. | 136 // Deleted when the dialog closes. |
136 ConstrainedWebDialogDelegateViewMac* constrained_delegate = | 137 ConstrainedWebDialogDelegateViewMac* constrained_delegate = |
137 new ConstrainedWebDialogDelegateViewMac( | 138 new ConstrainedWebDialogDelegateViewMac( |
138 browser_context, delegate, tab_delegate, web_contents); | 139 browser_context, delegate, tab_delegate, web_contents); |
139 return constrained_delegate; | 140 return constrained_delegate; |
140 } | 141 } |
OLD | NEW |