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

Side by Side Diff: content/browser/transition_request_manager.cc

Issue 297973002: Navigation transitions: Block first response until after transitions have run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/browser/transition_request_manager.h"
6
7 #include "base/memory/singleton.h"
8 #include "content/public/browser/browser_thread.h"
9
10 namespace content {
11
12 bool TransitionRequestManager::HasPendingTransitionRequest(
13 int process_id,
14 int render_frame_id) {
15 DCHECK_CURRENTLY_ON(BrowserThread::IO);
16
17 std::pair<int, int> key(process_id, render_frame_id);
18 return (pending_transition_frames_.find(key) !=
19 pending_transition_frames_.end());
20 }
21
22 void TransitionRequestManager::SetHasPendingTransitionRequest(
23 int process_id,
24 int render_frame_id,
25 bool has_pending) {
26 DCHECK_CURRENTLY_ON(BrowserThread::IO);
27
28 std::pair<int, int> key(process_id, render_frame_id);
29 if (has_pending) {
30 pending_transition_frames_.insert(key);
31 } else {
32 pending_transition_frames_.erase(key);
33 }
34 }
35
36 TransitionRequestManager::TransitionRequestManager() {
37 }
38
39 TransitionRequestManager::~TransitionRequestManager() {
40 }
41
42 // static
43 TransitionRequestManager* TransitionRequestManager::GetInstance() {
44 return Singleton<TransitionRequestManager>::get();
45 }
46
47 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/transition_request_manager.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698