OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/web_contents_modal_dialog_manager.h" | 5 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
6 | 6 |
7 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" | 7 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" |
8 #include "chrome/browser/ui/native_web_contents_modal_dialog_manager.h" | 8 #include "components/web_modal/native_web_contents_modal_dialog_manager.h" |
| 9 |
| 10 using web_modal::NativeWebContentsModalDialog; |
9 | 11 |
10 namespace { | 12 namespace { |
11 | 13 |
12 class NativeWebContentsModalDialogManagerCocoa | 14 class NativeWebContentsModalDialogManagerCocoa |
13 : public NativeWebContentsModalDialogManager { | 15 : public web_modal::NativeWebContentsModalDialogManager { |
14 public: | 16 public: |
15 NativeWebContentsModalDialogManagerCocoa() { | 17 NativeWebContentsModalDialogManagerCocoa() { |
16 } | 18 } |
17 | 19 |
18 virtual ~NativeWebContentsModalDialogManagerCocoa() { | 20 virtual ~NativeWebContentsModalDialogManagerCocoa() { |
19 } | 21 } |
20 | 22 |
21 // NativeWebContentsModalDialogManager overrides | 23 // NativeWebContentsModalDialogManager overrides |
22 virtual void ManageDialog(NativeWebContentsModalDialog dialog) OVERRIDE { | 24 virtual void ManageDialog(NativeWebContentsModalDialog dialog) OVERRIDE { |
23 } | 25 } |
(...skipping 21 matching lines...) Expand all Loading... |
45 static ConstrainedWindowMac* GetConstrainedWindowMac( | 47 static ConstrainedWindowMac* GetConstrainedWindowMac( |
46 NativeWebContentsModalDialog dialog) { | 48 NativeWebContentsModalDialog dialog) { |
47 return static_cast<ConstrainedWindowMac*>(dialog); | 49 return static_cast<ConstrainedWindowMac*>(dialog); |
48 } | 50 } |
49 | 51 |
50 DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerCocoa); | 52 DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerCocoa); |
51 }; | 53 }; |
52 | 54 |
53 } // namespace | 55 } // namespace |
54 | 56 |
| 57 namespace web_modal { |
| 58 |
55 NativeWebContentsModalDialogManager* | 59 NativeWebContentsModalDialogManager* |
56 WebContentsModalDialogManager::CreateNativeManager( | 60 WebContentsModalDialogManager::CreateNativeManager( |
57 NativeWebContentsModalDialogManagerDelegate* native_delegate) { | 61 NativeWebContentsModalDialogManagerDelegate* native_delegate) { |
58 return new NativeWebContentsModalDialogManagerCocoa; | 62 return new NativeWebContentsModalDialogManagerCocoa; |
59 } | 63 } |
| 64 |
| 65 } // namespace web_modal |
OLD | NEW |