| 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 23 matching lines...) Expand all Loading... |
| 44 void MockPermissionBubbleView::UpdateAnchorPosition() {} | 44 void MockPermissionBubbleView::UpdateAnchorPosition() {} |
| 45 | 45 |
| 46 gfx::NativeWindow MockPermissionBubbleView::GetNativeWindow() { | 46 gfx::NativeWindow MockPermissionBubbleView::GetNativeWindow() { |
| 47 // This class should only be used when the UI is not necessary. | 47 // This class should only be used when the UI is not necessary. |
| 48 NOTREACHED(); | 48 NOTREACHED(); |
| 49 return nullptr; | 49 return nullptr; |
| 50 } | 50 } |
| 51 | 51 |
| 52 MockPermissionBubbleView::MockPermissionBubbleView( | 52 MockPermissionBubbleView::MockPermissionBubbleView( |
| 53 MockPermissionBubbleFactory* factory, | 53 MockPermissionBubbleFactory* factory, |
| 54 PermissionBubbleManager* manager, | 54 PermissionRequestManager* manager, |
| 55 bool browser_test) | 55 bool browser_test) |
| 56 : factory_(factory), | 56 : factory_(factory), |
| 57 manager_(manager), | 57 manager_(manager), |
| 58 browser_test_(browser_test), | 58 browser_test_(browser_test), |
| 59 can_update_ui_(true), | 59 can_update_ui_(true), |
| 60 is_visible_(false) {} | 60 is_visible_(false) {} |
| OLD | NEW |