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

Side by Side Diff: chrome/browser/extensions/extension_renderer_state.h

Issue 21930006: <webview>: Allocate the view instance ID from the WebView shim (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT Created 7 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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/guestview/guestview.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_RENDERER_STATE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_RENDERER_STATE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_RENDERER_STATE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_RENDERER_STATE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
14 14
15 class WebViewGuest; 15 class WebViewGuest;
16 16
17 // This class keeps track of renderer state for use on the IO thread. All 17 // This class keeps track of renderer state for use on the IO thread. All
18 // methods should be called on the IO thread except for Init and Shutdown. 18 // methods should be called on the IO thread except for Init and Shutdown.
19 class ExtensionRendererState { 19 class ExtensionRendererState {
20 public: 20 public:
21 struct WebViewInfo { 21 struct WebViewInfo {
22 int embedder_process_id; 22 int embedder_process_id;
23 int embedder_routing_id; 23 int embedder_routing_id;
24 int guest_instance_id;
25 int instance_id; 24 int instance_id;
26 }; 25 };
27 26
28 static ExtensionRendererState* GetInstance(); 27 static ExtensionRendererState* GetInstance();
29 28
30 // These are called on the UI thread to start and stop listening to tab 29 // These are called on the UI thread to start and stop listening to tab
31 // notifications. 30 // notifications.
32 void Init(); 31 void Init();
33 void Shutdown(); 32 void Shutdown();
34 33
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void RemoveWebView(int render_process_host_id, int routing_id); 68 void RemoveWebView(int render_process_host_id, int routing_id);
70 69
71 TabObserver* observer_; 70 TabObserver* observer_;
72 TabAndWindowIdMap map_; 71 TabAndWindowIdMap map_;
73 WebViewInfoMap webview_info_map_; 72 WebViewInfoMap webview_info_map_;
74 73
75 DISALLOW_COPY_AND_ASSIGN(ExtensionRendererState); 74 DISALLOW_COPY_AND_ASSIGN(ExtensionRendererState);
76 }; 75 };
77 76
78 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_RENDERER_STATE_H_ 77 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_RENDERER_STATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/guestview/guestview.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698