| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/views/chrome_constrained_window_views_client.h" | 5 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/platform_util.h" | 9 #include "chrome/browser/platform_util.h" |
| 9 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
| 10 #include "components/web_modal/web_contents_modal_dialog_host.h" | 11 #include "components/web_modal/web_contents_modal_dialog_host.h" |
| 11 | 12 |
| 12 namespace { | 13 namespace { |
| 13 | 14 |
| 14 class ChromeConstrainedWindowViewsClient | 15 class ChromeConstrainedWindowViewsClient |
| 15 : public constrained_window::ConstrainedWindowViewsClient { | 16 : public constrained_window::ConstrainedWindowViewsClient { |
| 16 public: | 17 public: |
| 17 ChromeConstrainedWindowViewsClient() {} | 18 ChromeConstrainedWindowViewsClient() {} |
| (...skipping 13 matching lines...) Expand all Loading... |
| 31 } | 32 } |
| 32 gfx::NativeView GetDialogHostView(gfx::NativeWindow parent) override { | 33 gfx::NativeView GetDialogHostView(gfx::NativeWindow parent) override { |
| 33 return platform_util::GetViewForWindow(parent); | 34 return platform_util::GetViewForWindow(parent); |
| 34 } | 35 } |
| 35 | 36 |
| 36 DISALLOW_COPY_AND_ASSIGN(ChromeConstrainedWindowViewsClient); | 37 DISALLOW_COPY_AND_ASSIGN(ChromeConstrainedWindowViewsClient); |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 } // namespace | 40 } // namespace |
| 40 | 41 |
| 41 scoped_ptr<constrained_window::ConstrainedWindowViewsClient> | 42 std::unique_ptr<constrained_window::ConstrainedWindowViewsClient> |
| 42 CreateChromeConstrainedWindowViewsClient() { | 43 CreateChromeConstrainedWindowViewsClient() { |
| 43 return make_scoped_ptr(new ChromeConstrainedWindowViewsClient); | 44 return base::WrapUnique(new ChromeConstrainedWindowViewsClient); |
| 44 } | 45 } |
| OLD | NEW |