| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/memory/ptr_util.h" | 5 #include "base/memory/ptr_util.h" |
| 6 #include "chrome/browser/ui/browser.h" | 6 #include "chrome/browser/ui/browser.h" |
| 7 #include "chrome/browser/ui/browser_dialogs.h" | 7 #include "chrome/browser/ui/browser_dialogs.h" |
| 8 #include "chrome/browser/ui/browser_window.h" | 8 #include "chrome/browser/ui/browser_window.h" |
| 9 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 9 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 10 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" | 10 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 } | 28 } |
| 29 | 29 |
| 30 views::BubbleBorder::Arrow PermissionPromptImpl::GetAnchorArrow() { | 30 views::BubbleBorder::Arrow PermissionPromptImpl::GetAnchorArrow() { |
| 31 return views::BubbleBorder::TOP_LEFT; | 31 return views::BubbleBorder::TOP_LEFT; |
| 32 } | 32 } |
| 33 | 33 |
| 34 // static | 34 // static |
| 35 std::unique_ptr<PermissionPrompt> PermissionPrompt::Create(Browser* browser) { | 35 std::unique_ptr<PermissionPrompt> PermissionPrompt::Create(Browser* browser) { |
| 36 if (chrome::ToolkitViewsWebUIDialogsEnabled()) | 36 if (chrome::ToolkitViewsWebUIDialogsEnabled()) |
| 37 return base::WrapUnique(new PermissionPromptImpl(browser)); | 37 return base::WrapUnique(new PermissionPromptImpl(browser)); |
| 38 return base::WrapUnique(new PermissionBubbleCocoa(browser)); | 38 return base::MakeUnique<PermissionBubbleCocoa>(browser); |
| 39 } | 39 } |
| OLD | NEW |