| 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 "components/web_modal/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 "components/web_modal/native_web_contents_modal_dialog_manager.h" | 8 #include "components/web_modal/single_web_contents_dialog_manager.h" |
| 9 | 9 |
| 10 using web_modal::NativeWebContentsModalDialog; | 10 using web_modal::NativeWebContentsModalDialog; |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 class NativeWebContentsModalDialogManagerCocoa | 14 class NativeWebContentsModalDialogManagerCocoa |
| 15 : public web_modal::NativeWebContentsModalDialogManager { | 15 : public web_modal::SingleWebContentsDialogManager { |
| 16 public: | 16 public: |
| 17 NativeWebContentsModalDialogManagerCocoa() { | 17 NativeWebContentsModalDialogManagerCocoa() { |
| 18 } | 18 } |
| 19 | 19 |
| 20 virtual ~NativeWebContentsModalDialogManagerCocoa() { | 20 virtual ~NativeWebContentsModalDialogManagerCocoa() { |
| 21 } | 21 } |
| 22 | 22 |
| 23 // NativeWebContentsModalDialogManager overrides | 23 // SingleWebContentsDialogManager overrides |
| 24 virtual void ManageDialog(NativeWebContentsModalDialog dialog) OVERRIDE { | 24 virtual void ManageDialog(NativeWebContentsModalDialog dialog) OVERRIDE { |
| 25 } | 25 } |
| 26 | 26 |
| 27 virtual void ShowDialog(NativeWebContentsModalDialog dialog) OVERRIDE { | 27 virtual void ShowDialog(NativeWebContentsModalDialog dialog) OVERRIDE { |
| 28 GetConstrainedWindowMac(dialog)->ShowWebContentsModalDialog(); | 28 GetConstrainedWindowMac(dialog)->ShowWebContentsModalDialog(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 virtual void HideDialog(NativeWebContentsModalDialog dialog) OVERRIDE { | 31 virtual void HideDialog(NativeWebContentsModalDialog dialog) OVERRIDE { |
| 32 } | 32 } |
| 33 | 33 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 53 return static_cast<ConstrainedWindowMac*>(dialog); | 53 return static_cast<ConstrainedWindowMac*>(dialog); |
| 54 } | 54 } |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerCocoa); | 56 DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerCocoa); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace | 59 } // namespace |
| 60 | 60 |
| 61 namespace web_modal { | 61 namespace web_modal { |
| 62 | 62 |
| 63 NativeWebContentsModalDialogManager* | 63 SingleWebContentsDialogManager* |
| 64 WebContentsModalDialogManager::CreateNativeManager( | 64 WebContentsModalDialogManager::CreateNativeWebModalManager( |
| 65 NativeWebContentsModalDialogManagerDelegate* native_delegate) { | 65 SingleWebContentsDialogManagerDelegate* native_delegate) { |
| 66 return new NativeWebContentsModalDialogManagerCocoa; | 66 return new NativeWebContentsModalDialogManagerCocoa; |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace web_modal | 69 } // namespace web_modal |
| OLD | NEW |