Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: chrome/browser/ui/website_settings/mock_permission_bubble_view.cc

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/ui/website_settings/permission_bubble_manager.h" 9 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 void MockPermissionBubbleView::Show( 48 void MockPermissionBubbleView::Show(
49 const std::vector<PermissionBubbleRequest*>& requests, 49 const std::vector<PermissionBubbleRequest*>& requests,
50 const std::vector<bool>& accept_state) { 50 const std::vector<bool>& accept_state) {
51 visible_ = true; 51 visible_ = true;
52 ++show_count_; 52 ++show_count_;
53 requests_count_ += requests.size(); 53 requests_count_ += requests.size();
54 permission_requests_ = requests; 54 permission_requests_ = requests;
55 permission_states_ = accept_state; 55 permission_states_ = accept_state;
56 if (browser_test_) 56 if (browser_test_)
57 base::MessageLoopForUI::current()->Quit(); 57 base::MessageLoopForUI::current()->QuitWhenIdle();
58 } 58 }
59 59
60 void MockPermissionBubbleView::Hide() { 60 void MockPermissionBubbleView::Hide() {
61 visible_ = false; 61 visible_ = false;
62 } 62 }
63 63
64 bool MockPermissionBubbleView::IsVisible() { 64 bool MockPermissionBubbleView::IsVisible() {
65 return visible_; 65 return visible_;
66 } 66 }
67 67
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 browser_test_ = browser_test; 100 browser_test_ = browser_test;
101 } 101 }
102 102
103 MockPermissionBubbleView::MockPermissionBubbleView(bool browser_test) 103 MockPermissionBubbleView::MockPermissionBubbleView(bool browser_test)
104 : visible_(false), 104 : visible_(false),
105 show_count_(0), 105 show_count_(0),
106 requests_count_(0), 106 requests_count_(0),
107 can_accept_updates_(true), 107 can_accept_updates_(true),
108 delegate_(nullptr), 108 delegate_(nullptr),
109 browser_test_(browser_test) {} 109 browser_test_(browser_test) {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/web_dialog_view_browsertest.cc ('k') | chrome/browser/ui/webui/bidi_checker_web_ui_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698