| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/website_settings/permission_bubble_delegate.h" |
| 6 |
| 7 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" |
| 8 #include "components/bubble/bubble_ui.h" |
| 9 |
| 10 PermissionBubbleDelegate::PermissionBubbleDelegate( |
| 11 base::Callback<scoped_ptr<BubbleUI>(PermissionBubbleManager*)> ui_factory, |
| 12 PermissionBubbleManager* manager) |
| 13 : ui_factory_(ui_factory), manager_(manager) {} |
| 14 |
| 15 PermissionBubbleDelegate::~PermissionBubbleDelegate() {} |
| 16 |
| 17 void PermissionBubbleDelegate::DidClose() { |
| 18 manager_->DidClose(); |
| 19 } |
| 20 |
| 21 bool PermissionBubbleDelegate::ShouldCloseOnHide() const { |
| 22 return false; |
| 23 } |
| 24 |
| 25 scoped_ptr<BubbleUI> PermissionBubbleDelegate::BuildBubbleUI() { |
| 26 return PermissionBubbleDelegate::CreateBubble(manager_); |
| 27 } |
| 28 |
| 29 void* PermissionBubbleDelegate::GetContext() const { |
| 30 return manager_->web_contents(); |
| 31 } |
| OLD | NEW |