OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
nasko
2014/05/28 22:59:00
No "(c)" needed.
shatch
2014/05/29 21:41:22
Done.
| |
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 | |
9 namespace content { | |
10 | |
11 bool TransitionRequestManager::HasPendingTransitionRequest( | |
12 int renderer_id, int render_view_id) { | |
13 base::AutoLock lock(lock_); | |
14 | |
15 std::pair<int, int> key(renderer_id, render_view_id); | |
16 return pending_transition_views_.find(key) != | |
17 pending_transition_views_.end(); | |
18 } | |
19 | |
20 void TransitionRequestManager::SetHasPendingTransitionRequest( | |
21 int renderer_id, int render_view_id, bool has_pending) { | |
22 base::AutoLock lock(lock_); | |
23 | |
24 std::pair<int, int> key(renderer_id, render_view_id); | |
25 if (has_pending) { | |
26 pending_transition_views_.insert(key); | |
27 } else { | |
28 pending_transition_views_.erase(key); | |
29 } | |
30 } | |
31 | |
32 TransitionRequestManager::TransitionRequestManager() {} | |
33 | |
34 TransitionRequestManager::~TransitionRequestManager() {} | |
35 | |
36 // static | |
37 TransitionRequestManager* TransitionRequestManager::GetInstance() { | |
38 return Singleton<TransitionRequestManager>::get(); | |
39 } | |
40 | |
41 } // namespace content | |
OLD | NEW |