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

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

Issue 1251633002: Add BubbleManager to manage bubbles and ChromeBubbleManager for events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply Feedback Created 5 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/permission_bubble_manager.h" 5 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/user_metrics_action.h" 8 #include "base/metrics/user_metrics_action.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/chrome_bubble_manager.h"
12 #include "chrome/browser/ui/chrome_bubble_manager_factory.h"
13 #include "chrome/browser/ui/website_settings/permission_bubble_delegate.h"
9 #include "chrome/browser/ui/website_settings/permission_bubble_request.h" 14 #include "chrome/browser/ui/website_settings/permission_bubble_request.h"
10 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
11 #include "content/public/browser/browser_thread.h" 16 #include "content/public/browser/browser_thread.h"
12 #include "content/public/browser/navigation_details.h" 17 #include "content/public/browser/navigation_details.h"
13 #include "content/public/browser/user_metrics.h" 18 #include "content/public/browser/user_metrics.h"
14 19
15 namespace { 20 namespace {
16 21
17 class CancelledRequest : public PermissionBubbleRequest { 22 class CancelledRequest : public PermissionBubbleRequest {
18 public: 23 public:
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return true; 77 return true;
73 } 78 }
74 79
75 PermissionBubbleManager::PermissionBubbleManager( 80 PermissionBubbleManager::PermissionBubbleManager(
76 content::WebContents* web_contents) 81 content::WebContents* web_contents)
77 : content::WebContentsObserver(web_contents), 82 : content::WebContentsObserver(web_contents),
78 require_user_gesture_(false), 83 require_user_gesture_(false),
79 #if !defined(OS_ANDROID) // No bubbles in android tests. 84 #if !defined(OS_ANDROID) // No bubbles in android tests.
80 view_factory_(base::Bind(&PermissionBubbleView::Create)), 85 view_factory_(base::Bind(&PermissionBubbleView::Create)),
81 #endif 86 #endif
82 view_(nullptr),
83 main_frame_has_fully_loaded_(false), 87 main_frame_has_fully_loaded_(false),
84 auto_response_for_test_(NONE), 88 auto_response_for_test_(NONE),
85 weak_factory_(this) { 89 weak_factory_(this) {
86 } 90 }
87 91
88 PermissionBubbleManager::~PermissionBubbleManager() { 92 PermissionBubbleManager::~PermissionBubbleManager() {
89 if (view_ != NULL) 93 CancelPendingQueues();
90 view_->SetDelegate(NULL); 94 CloseBubble();
91
92 std::vector<PermissionBubbleRequest*>::iterator requests_iter;
93 for (requests_iter = requests_.begin();
94 requests_iter != requests_.end();
95 requests_iter++) {
96 (*requests_iter)->RequestFinished();
97 }
98 for (requests_iter = queued_requests_.begin();
99 requests_iter != queued_requests_.end();
100 requests_iter++) {
101 (*requests_iter)->RequestFinished();
102 }
103 } 95 }
104 96
105 void PermissionBubbleManager::AddRequest(PermissionBubbleRequest* request) { 97 void PermissionBubbleManager::AddRequest(PermissionBubbleRequest* request) {
106 content::RecordAction(base::UserMetricsAction("PermissionBubbleRequest")); 98 content::RecordAction(base::UserMetricsAction("PermissionBubbleRequest"));
107 // TODO(gbillock): is there a race between an early request on a 99 // TODO(gbillock): is there a race between an early request on a
108 // newly-navigated page and the to-be-cleaned-up requests on the previous 100 // newly-navigated page and the to-be-cleaned-up requests on the previous
109 // page? We should maybe listen to DidStartNavigationToPendingEntry (and 101 // page? We should maybe listen to DidStartNavigationToPendingEntry (and
110 // any other renderer-side nav initiations?). Double-check this for 102 // any other renderer-side nav initiations?). Double-check this for
111 // correct behavior on interstitials -- we probably want to basically queue 103 // correct behavior on interstitials -- we probably want to basically queue
112 // any request for which GetVisibleURL != GetLastCommittedURL. 104 // any request for which GetVisibleURL != GetLastCommittedURL.
(...skipping 28 matching lines...) Expand all
141 requests_.push_back(request); 133 requests_.push_back(request);
142 // TODO(gbillock): do we need to make default state a request property? 134 // TODO(gbillock): do we need to make default state a request property?
143 accept_states_.push_back(true); 135 accept_states_.push_back(true);
144 } else { 136 } else {
145 content::RecordAction( 137 content::RecordAction(
146 base::UserMetricsAction("PermissionBubbleIFrameRequestQueued")); 138 base::UserMetricsAction("PermissionBubbleIFrameRequestQueued"));
147 queued_frame_requests_.push_back(request); 139 queued_frame_requests_.push_back(request);
148 } 140 }
149 141
150 if (!require_user_gesture_ || request->HasUserGesture()) 142 if (!require_user_gesture_ || request->HasUserGesture())
151 ScheduleShowBubble(); 143 TriggerShowBubble();
152 } 144 }
153 145
154 void PermissionBubbleManager::CancelRequest(PermissionBubbleRequest* request) { 146 void PermissionBubbleManager::CancelRequest(PermissionBubbleRequest* request) {
155 // First look in the queued requests, where we can simply delete the request 147 // First look in the queued requests, where we can simply delete the request
156 // and go on. 148 // and go on.
157 std::vector<PermissionBubbleRequest*>::iterator requests_iter; 149 std::vector<PermissionBubbleRequest*>::iterator requests_iter;
158 for (requests_iter = queued_requests_.begin(); 150 for (requests_iter = queued_requests_.begin();
159 requests_iter != queued_requests_.end(); 151 requests_iter != queued_requests_.end();
160 requests_iter++) { 152 requests_iter++) {
161 if (*requests_iter == request) { 153 if (*requests_iter == request) {
162 (*requests_iter)->RequestFinished(); 154 (*requests_iter)->RequestFinished();
163 queued_requests_.erase(requests_iter); 155 queued_requests_.erase(requests_iter);
164 return; 156 return;
165 } 157 }
166 } 158 }
167 159
168 std::vector<bool>::iterator accepts_iter = accept_states_.begin(); 160 std::vector<bool>::iterator accepts_iter = accept_states_.begin();
169 for (requests_iter = requests_.begin(), accepts_iter = accept_states_.begin(); 161 for (requests_iter = requests_.begin(), accepts_iter = accept_states_.begin();
170 requests_iter != requests_.end(); 162 requests_iter != requests_.end();
171 requests_iter++, accepts_iter++) { 163 requests_iter++, accepts_iter++) {
172 if (*requests_iter != request) 164 if (*requests_iter != request)
173 continue; 165 continue;
174 166
175 // We can simply erase the current entry in the request table if we aren't 167 // We can simply erase the current entry in the request table if we aren't
176 // showing the dialog, or if we are showing it and it can accept the update. 168 // showing the dialog, or if we are showing it and it can accept the update.
177 bool can_erase = !IsBubbleVisible() || view_->CanAcceptRequestUpdate(); 169 bool can_erase = !IsBubbleVisible();
170
171 // TODO(hcarmona): Don't forget this logic. Maybe improve it? Or remove it?
172 // bool can_erase = !IsBubbleVisible() || view_->CanAcceptRequestUpdate();
173
178 if (can_erase) { 174 if (can_erase) {
179 (*requests_iter)->RequestFinished(); 175 (*requests_iter)->RequestFinished();
180 requests_.erase(requests_iter); 176 requests_.erase(requests_iter);
181 accept_states_.erase(accepts_iter); 177 accept_states_.erase(accepts_iter);
182 178
179 /*
183 if (IsBubbleVisible()) { 180 if (IsBubbleVisible()) {
184 view_->Hide(); 181 UpdateBubble(); // TODO(hcarmona): HOW?
groby-ooo-7-16 2015/08/06 21:32:56 Why not keep the old approach of calling Hide()?
hcarmona 2015/08/07 02:12:58 Anyone who lets the bubble manager manage their bu
185 // Will redraw the bubble if it is being shown. 182 // Will redraw the bubble if it is being shown.
186 TriggerShowBubble(); 183 TriggerShowBubble();
187 } 184 }
185 */
188 return; 186 return;
189 } 187 }
190 188
191 // Cancel the existing request and replace it with a dummy. 189 // Cancel the existing request and replace it with a dummy.
192 PermissionBubbleRequest* cancelled_request = 190 PermissionBubbleRequest* cancelled_request =
193 new CancelledRequest(*requests_iter); 191 new CancelledRequest(*requests_iter);
194 (*requests_iter)->RequestFinished(); 192 (*requests_iter)->RequestFinished();
195 *requests_iter = cancelled_request; 193 *requests_iter = cancelled_request;
196 return; 194 return;
197 } 195 }
198 196
199 NOTREACHED(); // Callers should not cancel requests that are not pending. 197 NOTREACHED(); // Callers should not cancel requests that are not pending.
200 } 198 }
201 199
202 void PermissionBubbleManager::HideBubble() { 200 void PermissionBubbleManager::CloseBubble() {
203 // Disengage from the existing view if there is one. 201 if (!active_bubble_)
204 if (!view_)
205 return; 202 return;
206 203 ChromeBubbleManagerFactory::GetForBrowserContext(browser_->profile())
groby-ooo-7-16 2015/08/06 21:32:56 Can we just call active_bubble_->Close() here?
hcarmona 2015/08/07 02:12:58 Closing bubbles should go through the bubble manag
207 view_->SetDelegate(nullptr); 204 ->CloseBubble(active_bubble_);
208 view_->Hide();
209 view_.reset();
210 }
211
212 void PermissionBubbleManager::DisplayPendingRequests(Browser* browser) {
213 if (IsBubbleVisible())
214 return;
215
216 view_ = view_factory_.Run(browser);
217 view_->SetDelegate(this);
218
219 TriggerShowBubble();
220 }
221
222 void PermissionBubbleManager::UpdateAnchorPosition() {
223 if (view_)
224 view_->UpdateAnchorPosition();
225 } 205 }
226 206
227 bool PermissionBubbleManager::IsBubbleVisible() { 207 bool PermissionBubbleManager::IsBubbleVisible() {
228 return view_ && view_->IsVisible(); 208 return active_bubble_;
229 }
230
231 gfx::NativeWindow PermissionBubbleManager::GetBubbleWindow() {
232 if (view_)
233 return view_->GetNativeWindow();
234 return nullptr;
235 } 209 }
236 210
237 void PermissionBubbleManager::RequireUserGesture(bool required) { 211 void PermissionBubbleManager::RequireUserGesture(bool required) {
238 require_user_gesture_ = required; 212 require_user_gesture_ = required;
239 } 213 }
240 214
241 void PermissionBubbleManager::DidNavigateMainFrame( 215 void PermissionBubbleManager::DidNavigateMainFrame(
242 const content::LoadCommittedDetails& details, 216 const content::LoadCommittedDetails& details,
243 const content::FrameNavigateParams& params) { 217 const content::FrameNavigateParams& params) {
244 if (details.is_in_page) 218 if (details.is_in_page)
245 return; 219 return;
246 220
247 main_frame_has_fully_loaded_ = false; 221 main_frame_has_fully_loaded_ = false;
248 } 222 }
249 223
250 void PermissionBubbleManager::DocumentOnLoadCompletedInMainFrame() { 224 void PermissionBubbleManager::DocumentOnLoadCompletedInMainFrame() {
251 main_frame_has_fully_loaded_ = true; 225 main_frame_has_fully_loaded_ = true;
252 // This is scheduled because while all calls to the browser have been 226 // This is scheduled because while all calls to the browser have been
253 // issued at DOMContentLoaded, they may be bouncing around in scheduled 227 // issued at DOMContentLoaded, they may be bouncing around in scheduled
254 // callbacks finding the UI thread still. This makes sure we allow those 228 // callbacks finding the UI thread still. This makes sure we allow those
255 // scheduled calls to AddRequest to complete before we show the page-load 229 // scheduled calls to AddRequest to complete before we show the page-load
256 // permissions bubble. 230 // permissions bubble.
257 ScheduleShowBubble(); 231 TriggerShowBubble();
258 } 232 }
259 233
260 void PermissionBubbleManager::DocumentLoadedInFrame( 234 void PermissionBubbleManager::DocumentLoadedInFrame(
261 content::RenderFrameHost* render_frame_host) { 235 content::RenderFrameHost* render_frame_host) {
262 ScheduleShowBubble(); 236 TriggerShowBubble();
263 } 237 }
264 238
265 void PermissionBubbleManager::NavigationEntryCommitted( 239 void PermissionBubbleManager::NavigationEntryCommitted(
266 const content::LoadCommittedDetails& details) { 240 const content::LoadCommittedDetails& details) {
267 // No permissions requests pending. 241 // No permissions requests pending.
268 if (request_url_.is_empty()) 242 if (request_url_.is_empty())
269 return; 243 return;
270 244
271 // If we have navigated to a new url or reloaded the page... 245 // If we have navigated to a new url or reloaded the page...
272 // GetAsReferrer strips fragment and username/password, meaning 246 if (!details.is_in_page ||
groby-ooo-7-16 2015/08/06 21:32:56 That's a separate fix, no? I suppose we're just wa
hcarmona 2015/08/07 02:12:58 Yes, reverted.
273 // the navigation is really to the same page. 247 details.type == content::NAVIGATION_TYPE_SAME_PAGE ||
274 if ((request_url_.GetAsReferrer() != 248 details.type == content::NAVIGATION_TYPE_EXISTING_PAGE) {
275 web_contents()->GetLastCommittedURL().GetAsReferrer()) || 249 // kill off existing bubble and cancel any pending requests.
276 (details.type == content::NAVIGATION_TYPE_EXISTING_PAGE &&
277 !details.is_in_page)) {
278 // Kill off existing bubble and cancel any pending requests.
279 CancelPendingQueues(); 250 CancelPendingQueues();
280 FinalizeBubble(); 251 CloseBubble();
281 } 252 }
282 } 253 }
283 254
284 void PermissionBubbleManager::WebContentsDestroyed() { 255 void PermissionBubbleManager::WebContentsDestroyed() {
285 // If the web contents has been destroyed, treat the bubble as cancelled. 256 // If the web contents has been destroyed, treat the bubble as cancelled.
286 CancelPendingQueues(); 257 CancelPendingQueues();
287 FinalizeBubble(); 258 CloseBubble();
288 259
289 // The WebContents is going away; be aggressively paranoid and delete 260 // The WebContents is going away; be aggressively paranoid and delete
290 // ourselves lest other parts of the system attempt to add permission bubbles 261 // ourselves lest other parts of the system attempt to add permission bubbles
291 // or use us otherwise during the destruction. 262 // or use us otherwise during the destruction.
292 web_contents()->RemoveUserData(UserDataKey()); 263 web_contents()->RemoveUserData(UserDataKey());
293 // That was the equivalent of "delete this". This object is now destroyed; 264 // That was the equivalent of "delete this". This object is now destroyed;
294 // returning from this function is the only safe thing to do. 265 // returning from this function is the only safe thing to do.
295 } 266 }
296 267
297 void PermissionBubbleManager::ToggleAccept(int request_index, bool new_value) { 268 void PermissionBubbleManager::ToggleAccept(int request_index, bool new_value) {
298 DCHECK(request_index < static_cast<int>(accept_states_.size())); 269 DCHECK(request_index < static_cast<int>(accept_states_.size()));
299 accept_states_[request_index] = new_value; 270 accept_states_[request_index] = new_value;
300 } 271 }
301 272
302 void PermissionBubbleManager::Accept() { 273 void PermissionBubbleManager::Accept() {
303 std::vector<PermissionBubbleRequest*>::iterator requests_iter; 274 std::vector<PermissionBubbleRequest*>::iterator requests_iter;
304 std::vector<bool>::iterator accepts_iter = accept_states_.begin(); 275 std::vector<bool>::iterator accepts_iter = accept_states_.begin();
305 for (requests_iter = requests_.begin(), accepts_iter = accept_states_.begin(); 276 for (requests_iter = requests_.begin(), accepts_iter = accept_states_.begin();
306 requests_iter != requests_.end(); 277 requests_iter != requests_.end();
307 requests_iter++, accepts_iter++) { 278 requests_iter++, accepts_iter++) {
308 if (*accepts_iter) 279 if (*accepts_iter)
309 (*requests_iter)->PermissionGranted(); 280 (*requests_iter)->PermissionGranted();
310 else 281 else
311 (*requests_iter)->PermissionDenied(); 282 (*requests_iter)->PermissionDenied();
312 } 283 }
313 FinalizeBubble(); 284 CloseBubble();
314 } 285 }
315 286
316 void PermissionBubbleManager::Deny() { 287 void PermissionBubbleManager::Deny() {
317 std::vector<PermissionBubbleRequest*>::iterator requests_iter; 288 std::vector<PermissionBubbleRequest*>::iterator requests_iter;
318 for (requests_iter = requests_.begin(); 289 for (requests_iter = requests_.begin();
319 requests_iter != requests_.end(); 290 requests_iter != requests_.end();
320 requests_iter++) { 291 requests_iter++) {
321 (*requests_iter)->PermissionDenied(); 292 (*requests_iter)->PermissionDenied();
322 } 293 }
323 FinalizeBubble(); 294 CloseBubble();
324 } 295 }
325 296
326 void PermissionBubbleManager::Closing() { 297 void PermissionBubbleManager::Closing() {
327 std::vector<PermissionBubbleRequest*>::iterator requests_iter; 298 std::vector<PermissionBubbleRequest*>::iterator requests_iter;
328 for (requests_iter = requests_.begin(); 299 for (requests_iter = requests_.begin();
329 requests_iter != requests_.end(); 300 requests_iter != requests_.end();
330 requests_iter++) { 301 requests_iter++) {
331 (*requests_iter)->Cancelled(); 302 (*requests_iter)->Cancelled();
332 } 303 }
333 FinalizeBubble(); 304 CloseBubble();
334 } 305 }
335 306
336 void PermissionBubbleManager::ScheduleShowBubble() { 307 void PermissionBubbleManager::Finalize() {
337 // ::ScheduleShowBubble() will be called again when the main frame will be 308 std::vector<PermissionBubbleRequest*>::iterator requests_iter;
338 // loaded. 309 for (requests_iter = requests_.begin();
groby-ooo-7-16 2015/08/06 21:32:56 C++11 please for(PermissionBubbleRequest* request
hcarmona 2015/08/07 02:12:58 Awesome, I'll update the iterators.
339 if (!main_frame_has_fully_loaded_) 310 requests_iter != requests_.end();
340 return; 311 requests_iter++) {
341 312 (*requests_iter)->RequestFinished();
342 content::BrowserThread::PostTask( 313 }
groby-ooo-7-16 2015/08/06 21:32:56 We needed a thread transition here - are we now gu
hcarmona 2015/08/07 02:12:58 The bubble manager will always defer show to the U
343 content::BrowserThread::UI, 314 requests_.clear();
344 FROM_HERE, 315 accept_states_.clear();
345 base::Bind(&PermissionBubbleManager::TriggerShowBubble, 316 if (queued_requests_.size() || queued_frame_requests_.size())
346 weak_factory_.GetWeakPtr())); 317 TriggerShowBubble();
318 else
319 request_url_ = GURL();
347 } 320 }
348 321
349 void PermissionBubbleManager::TriggerShowBubble() { 322 void PermissionBubbleManager::TriggerShowBubble() {
350 if (!view_)
351 return;
352 if (IsBubbleVisible()) 323 if (IsBubbleVisible())
353 return; 324 return;
354 if (!main_frame_has_fully_loaded_) 325 if (!main_frame_has_fully_loaded_)
355 return; 326 return;
356 if (requests_.empty() && queued_requests_.empty() && 327 if (requests_.empty() && queued_requests_.empty() &&
357 queued_frame_requests_.empty()) { 328 queued_frame_requests_.empty()) {
358 return; 329 return;
359 } 330 }
360 331
361 if (requests_.empty()) { 332 if (requests_.empty()) {
362 // Queues containing a user-gesture-generated request have priority. 333 // Queues containing a user-gesture-generated request have priority.
363 if (HasUserGestureRequest(queued_requests_)) 334 if (HasUserGestureRequest(queued_requests_))
364 requests_.swap(queued_requests_); 335 requests_.swap(queued_requests_);
365 else if (HasUserGestureRequest(queued_frame_requests_)) 336 else if (HasUserGestureRequest(queued_frame_requests_))
366 requests_.swap(queued_frame_requests_); 337 requests_.swap(queued_frame_requests_);
367 else if (queued_requests_.size()) 338 else if (queued_requests_.size())
368 requests_.swap(queued_requests_); 339 requests_.swap(queued_requests_);
369 else 340 else
370 requests_.swap(queued_frame_requests_); 341 requests_.swap(queued_frame_requests_);
371 342
372 // Sets the default value for each request to be 'accept'. 343 // Sets the default value for each request to be 'accept'.
373 // TODO(leng): Currently all requests default to true. If that changes: 344 // TODO(leng): Currently all requests default to true. If that changes:
374 // a) Add additional accept_state queues to store default values. 345 // a) Add additional accept_state queues to store default values.
375 // b) Change the request API to provide the default value. 346 // b) Change the request API to provide the default value.
376 accept_states_.resize(requests_.size(), true); 347 accept_states_.resize(requests_.size(), true);
377 } 348 }
378 349
379 view_->Show(requests_, accept_states_); 350 if (!active_bubble_) {
351 ChromeBubbleManagerFactory::GetForBrowserContext(browser_->profile())
groby-ooo-7-16 2015/08/06 21:32:56 Doesn't ShowBubble return an active_bubble_?
hcarmona 2015/08/07 02:12:58 Yes... this code's broken. Fixed.
352 ->ShowBubble(
353 make_scoped_ptr(new PermissionBubbleDelegate(this, view_factory_)));
354 } else {
355 NOTREACHED();
groby-ooo-7-16 2015/08/06 21:32:56 Please don't handle NOTREACHED separately. If acti
hcarmona 2015/08/07 02:12:58 Yes, this was debug code and it shouldn't exist.
356 }
357
380 NotifyBubbleAdded(); 358 NotifyBubbleAdded();
381 359
382 // If in testing mode, automatically respond to the bubble that was shown. 360 // If in testing mode, automatically respond to the bubble that was shown.
383 if (auto_response_for_test_ != NONE) 361 if (auto_response_for_test_ != NONE)
384 DoAutoResponseForTesting(); 362 DoAutoResponseForTesting();
385 } 363 }
386 364
387 void PermissionBubbleManager::FinalizeBubble() {
388 if (view_)
389 view_->Hide();
390
391 std::vector<PermissionBubbleRequest*>::iterator requests_iter;
392 for (requests_iter = requests_.begin();
393 requests_iter != requests_.end();
394 requests_iter++) {
395 (*requests_iter)->RequestFinished();
396 }
397 requests_.clear();
398 accept_states_.clear();
399 if (queued_requests_.size() || queued_frame_requests_.size())
400 TriggerShowBubble();
401 else
402 request_url_ = GURL();
403 }
404
405 void PermissionBubbleManager::CancelPendingQueues() { 365 void PermissionBubbleManager::CancelPendingQueues() {
406 std::vector<PermissionBubbleRequest*>::iterator requests_iter; 366 std::vector<PermissionBubbleRequest*>::iterator requests_iter;
407 for (requests_iter = queued_requests_.begin(); 367 for (requests_iter = queued_requests_.begin();
408 requests_iter != queued_requests_.end(); 368 requests_iter != queued_requests_.end();
409 requests_iter++) { 369 requests_iter++) {
410 (*requests_iter)->RequestFinished(); 370 (*requests_iter)->RequestFinished();
411 } 371 }
412 for (requests_iter = queued_frame_requests_.begin(); 372 for (requests_iter = queued_frame_requests_.begin();
413 requests_iter != queued_frame_requests_.end(); 373 requests_iter != queued_frame_requests_.end();
414 requests_iter++) { 374 requests_iter++) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 case DENY_ALL: 429 case DENY_ALL:
470 Deny(); 430 Deny();
471 break; 431 break;
472 case DISMISS: 432 case DISMISS:
473 Closing(); 433 Closing();
474 break; 434 break;
475 case NONE: 435 case NONE:
476 NOTREACHED(); 436 NOTREACHED();
477 } 437 }
478 } 438 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698