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

Side by Side Diff: content/browser/frame_mapper.h

Issue 8760024: Cross-process postMessage (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years 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 (c) 2011 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 #ifndef CONTENT_BROWSER_FRAME_MAPPER_H_
6 #define CONTENT_BROWSER_FRAME_MAPPER_H_
7
8 #include "base/atomic_sequence_num.h"
9 #include "base/hash_tables.h"
10 #include "content/browser/browsing_instance_frame_id.h"
11 #include "content/common/content_export.h"
12
13 namespace content {
14 class CONTENT_EXPORT FrameMapper {
Charlie Reis 2011/12/01 23:13:02 Maybe FrameMap?
supersat 2011/12/09 23:08:20 Done.
15 public:
16 FrameMapper();
17 virtual ~FrameMapper();
18
19 int64 AllocateFrameId();
20 BrowsingInstanceFrame* InitializeFrameId(int64 frame_id, bool is_top_level);
21
22 BrowsingInstanceFrame* AllocateNewTopLevelFrameId();
23 BrowsingInstanceFrame* FindById(int64 id);
24 BrowsingInstanceFrame* FindByWebKitId(int render_process_host_id,
25 int64 frame_id);
26 BrowsingInstanceFrame* FindTopLevelFrameByProcessAndRoute(int process_id,
27 int route_id);
28
29 void UpdateFrame(BrowsingInstanceFrame* frame,
30 int render_process_host_id,
31 int route_id,
32 int64 frame_id);
33 void RemoveFrame(BrowsingInstanceFrame* frame);
34
35 private:
36 typedef base::hash_map<int64, BrowsingInstanceFrame*> FrameIdMap;
37 typedef base::hash_map<
38 BrowsingInstanceFrame::WebKitFrameIdTuple,
39 BrowsingInstanceFrame*> WebKitFrameIdMap;
40
41
42 // TODO(supersat): Make this 64-bit?
43 base::AtomicSequenceNumber next_frame_id_;
44 FrameIdMap frame_id_map_;
45 WebKitFrameIdMap webkit_frame_id_map_;
46
47 DISALLOW_COPY_AND_ASSIGN(FrameMapper);
48 };
49
50 } // namespace content
51 #endif // CONTENT_BROWSER_FRAME_MAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698