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

Side by Side Diff: chrome/browser/notifications/notification_test_util.cc

Issue 2377553003: Add ShouldDisplayOverFullscreen support to web notifications. (Closed)
Patch Set: Final formatting fixes Created 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/notifications/notification_test_util.h" 5 #include "chrome/browser/notifications/notification_test_util.h"
6 6
7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
9 #include "content/public/test/test_utils.h"
10
7 MockNotificationDelegate::MockNotificationDelegate(const std::string& id) 11 MockNotificationDelegate::MockNotificationDelegate(const std::string& id)
8 : id_(id) {} 12 : id_(id) {}
9 13
10 MockNotificationDelegate::~MockNotificationDelegate() {} 14 MockNotificationDelegate::~MockNotificationDelegate() {}
11 15
12 std::string MockNotificationDelegate::id() const { return id_; } 16 std::string MockNotificationDelegate::id() const { return id_; }
13 17
14 // ----------------------------------------------------------------------------- 18 // -----------------------------------------------------------------------------
15 19
16 StubNotificationUIManager::StubNotificationUIManager() {} 20 StubNotificationUIManager::StubNotificationUIManager() {}
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 bool StubNotificationUIManager::CancelAllByProfile(ProfileID profile_id) { 132 bool StubNotificationUIManager::CancelAllByProfile(ProfileID profile_id) {
129 NOTIMPLEMENTED(); 133 NOTIMPLEMENTED();
130 return false; 134 return false;
131 } 135 }
132 136
133 void StubNotificationUIManager::CancelAll() { 137 void StubNotificationUIManager::CancelAll() {
134 for (const auto& pair : notifications_) 138 for (const auto& pair : notifications_)
135 pair.first.delegate()->Close(false /* by_user */); 139 pair.first.delegate()->Close(false /* by_user */);
136 notifications_.clear(); 140 notifications_.clear();
137 } 141 }
142
143 FullscreenStateWaiter::FullscreenStateWaiter(
144 Browser* browser, bool desired_state)
145 : browser_(browser),
146 desired_state_(desired_state) {}
147
148 void FullscreenStateWaiter::Wait() {
149 while (desired_state_ !=
150 browser_->exclusive_access_manager()->context()->IsFullscreen()) {
151 content::RunAllPendingInMessageLoop();
152 }
153 }
OLDNEW
« no previous file with comments | « chrome/browser/notifications/notification_test_util.h ('k') | chrome/browser/notifications/persistent_notification_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698