| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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/website_settings/mock_permission_bubble_view.h" | 5 #include "chrome/browser/ui/website_settings/mock_permission_bubble_view.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "chrome/browser/permissions/permission_request_manager.h" |
| 9 #include "chrome/browser/ui/website_settings/mock_permission_bubble_factory.h" | 10 #include "chrome/browser/ui/website_settings/mock_permission_bubble_factory.h" |
| 10 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" | |
| 11 | 11 |
| 12 MockPermissionBubbleView::~MockPermissionBubbleView() { | 12 MockPermissionBubbleView::~MockPermissionBubbleView() { |
| 13 Hide(); | 13 Hide(); |
| 14 } | 14 } |
| 15 | 15 |
| 16 void MockPermissionBubbleView::Show( | 16 void MockPermissionBubbleView::Show( |
| 17 const std::vector<PermissionBubbleRequest*>& requests, | 17 const std::vector<PermissionBubbleRequest*>& requests, |
| 18 const std::vector<bool>& accept_state) { | 18 const std::vector<bool>& accept_state) { |
| 19 factory_->ShowView(this); | 19 factory_->ShowView(this); |
| 20 factory_->show_count_++; | 20 factory_->show_count_++; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 41 void MockPermissionBubbleView::UpdateAnchorPosition() {} | 41 void MockPermissionBubbleView::UpdateAnchorPosition() {} |
| 42 | 42 |
| 43 gfx::NativeWindow MockPermissionBubbleView::GetNativeWindow() { | 43 gfx::NativeWindow MockPermissionBubbleView::GetNativeWindow() { |
| 44 // This class should only be used when the UI is not necessary. | 44 // This class should only be used when the UI is not necessary. |
| 45 NOTREACHED(); | 45 NOTREACHED(); |
| 46 return nullptr; | 46 return nullptr; |
| 47 } | 47 } |
| 48 | 48 |
| 49 MockPermissionBubbleView::MockPermissionBubbleView( | 49 MockPermissionBubbleView::MockPermissionBubbleView( |
| 50 MockPermissionBubbleFactory* factory, | 50 MockPermissionBubbleFactory* factory, |
| 51 PermissionBubbleManager* manager) | 51 PermissionRequestManager* manager) |
| 52 : factory_(factory), | 52 : factory_(factory), |
| 53 manager_(manager), | 53 manager_(manager), |
| 54 can_update_ui_(true), | 54 can_update_ui_(true), |
| 55 is_visible_(false) {} | 55 is_visible_(false) {} |
| OLD | NEW |