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

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

Issue 8760024: Cross-process postMessage (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Current checkpoint Created 8 years, 12 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
« no previous file with comments | « content/browser/content_frame.cc ('k') | content/browser/frame_map.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/hash_tables.h"
9 #include "content/browser/content_frame.h"
10 #include "content/common/content_export.h"
11
12 class TabContents;
13
14 namespace content {
15 // This class tracks all ContentFrames, allowing them to be looked up by a
16 // variety of identifiers. Additionally, it allocates the ContentFrames'
17 // globally-unique identifiers.
18
19 class CONTENT_EXPORT FrameMap {
20 public:
21 FrameMap();
22 virtual ~FrameMap();
23
24 // Creates and initializes a ContentFrame.
25 ContentFrame* InitializeFrame(bool is_top_level,
26 TabContents& tab_contents,
27 ContentFrame* opener);
28
29 ContentFrame* FindFrame(int64 id);
30 ContentFrame* FindRendererFrame(int render_process_host_id,
31 int64 frame_id);
32 ContentFrame* FindTopLevelFrame(int process_id, int route_id);
33
34 void UpdateFrame(ContentFrame* frame,
35 int render_process_host_id,
36 int route_id,
37 int64 frame_id);
38 void AddSwappedOutRendererToFrame(ContentFrame* frame,
39 int render_process_host_id,
40 int route_id,
41 int64 frame_id);
42 void RemoveFrame(ContentFrame* frame);
43
44 private:
45 void ClearChildren(ContentFrame* frame);
46
47 typedef base::hash_map<int64, ContentFrame*> FrameIdMap;
48 typedef base::hash_map<
49 WebKitFrameIdentifier,
50 ContentFrame*> WebKitFrameIdMap;
51
52 int64 next_frame_id_;
53 FrameIdMap frame_id_map_;
54 WebKitFrameIdMap webkit_frame_id_map_;
55
56 DISALLOW_COPY_AND_ASSIGN(FrameMap);
57 };
58
59 } // namespace content
60 #endif // CONTENT_BROWSER_FRAME_MAPPER_H_
OLDNEW
« no previous file with comments | « content/browser/content_frame.cc ('k') | content/browser/frame_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698