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_window.h" | 7 #include "chrome/browser/ui/browser_window.h" |
8 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h" | 8 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h" |
9 #include "chrome/browser/ui/views/frame/browser_view.h" | 9 #include "chrome/browser/ui/views/frame/browser_view.h" |
10 #include "chrome/browser/ui/views/frame/top_container_view.h" | 10 #include "chrome/browser/ui/views/frame/top_container_view.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // not be 0,0 if there are multiple displays). | 41 // not be 0,0 if there are multiple displays). |
42 gfx::Point browser_view_origin = browser_view->GetBoundsInScreen().origin(); | 42 gfx::Point browser_view_origin = browser_view->GetBoundsInScreen().origin(); |
43 return browser_view_origin + gfx::Vector2d(x_within_browser_view, 0); | 43 return browser_view_origin + gfx::Vector2d(x_within_browser_view, 0); |
44 } | 44 } |
45 | 45 |
46 views::BubbleBorder::Arrow PermissionPromptImpl::GetAnchorArrow() { | 46 views::BubbleBorder::Arrow PermissionPromptImpl::GetAnchorArrow() { |
47 return views::BubbleBorder::TOP_LEFT; | 47 return views::BubbleBorder::TOP_LEFT; |
48 } | 48 } |
49 | 49 |
50 // static | 50 // static |
51 std::unique_ptr<PermissionPrompt> PermissionPrompt::Create(Browser* browser) { | 51 std::unique_ptr<PermissionPrompt> PermissionPrompt::Create( |
52 return base::WrapUnique(new PermissionPromptImpl(browser)); | 52 content::WebContents* web_contents) { |
| 53 return base::WrapUnique(new PermissionPromptImpl(web_contents)); |
53 } | 54 } |
OLD | NEW |