Chromium Code Reviews| 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 PermissionBubbleManager* manager, | |
| 12 PermissionBubbleView::Factory view_factory) | |
| 13 : manager_(manager), view_factory_(view_factory) {} | |
| 14 | |
| 15 PermissionBubbleDelegate::~PermissionBubbleDelegate() {} | |
| 16 | |
| 17 void PermissionBubbleDelegate::Finalize() { | |
| 18 manager_->Finalize(); | |
| 19 } | |
| 20 | |
| 21 bool PermissionBubbleDelegate::CloseOnHide() { | |
| 22 return false; | |
| 23 } | |
| 24 | |
| 25 scoped_ptr<BubbleUI> PermissionBubbleDelegate::BuildBubbleUI() { | |
| 26 return PermissionBubbleView::Create(this); | |
| 27 } | |
| 28 | |
| 29 void* PermissionBubbleDelegate::GetContext() { | |
| 30 return manager_->web_contents(); | |
| 31 } | |
| 32 | |
| 33 void PermissionBubbleDelegate::ToggleAccept(int index, bool new_value) { | |
| 34 manager_->ToggleAccept(index, new_value); | |
| 35 } | |
| 36 | |
| 37 void PermissionBubbleDelegate::Accept() { | |
| 38 manager_->Accept(); | |
| 39 } | |
| 40 | |
| 41 void PermissionBubbleDelegate::Deny() { | |
| 42 manager_->Deny(); | |
| 43 } | |
| 44 | |
| 45 void PermissionBubbleDelegate::Closing() { | |
| 46 manager_->Closing(); | |
| 47 } | |
| 48 | |
| 49 Browser* PermissionBubbleDelegate::browser() { | |
|
groby-ooo-7-16
2015/08/06 21:32:56
GetBrowser, please
If it's not inlined, it's not
hcarmona
2015/08/07 02:12:58
Ok, sounds good.
| |
| 50 return manager_->browser(); | |
| 51 } | |
| 52 | |
| 53 const std::vector<PermissionBubbleRequest*>& | |
| 54 PermissionBubbleDelegate::requests() { | |
| 55 return manager_->requests(); | |
| 56 } | |
| 57 | |
| 58 const std::vector<bool>& PermissionBubbleDelegate::accept_states() { | |
| 59 return manager_->accept_states(); | |
| 60 } | |
| OLD | NEW |