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

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

Issue 22793018: <webview>: Implement support for package-local chrome-extension:// URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test that broken Created 7 years, 2 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
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 <string>
10 #include <utility> 11 #include <utility>
11 12
12 #include "base/basictypes.h" 13 #include "base/basictypes.h"
13 #include "base/memory/singleton.h" 14 #include "base/memory/singleton.h"
14 15
15 class WebViewGuest; 16 class WebViewGuest;
16 17
17 // This class keeps track of renderer state for use on the IO thread. All 18 // 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. 19 // methods should be called on the IO thread except for Init and Shutdown.
19 class ExtensionRendererState { 20 class ExtensionRendererState {
20 public: 21 public:
21 struct WebViewInfo { 22 struct WebViewInfo {
22 int embedder_process_id; 23 int embedder_process_id;
23 int instance_id; 24 int instance_id;
25 std::string partition_id;
24 }; 26 };
25 27
26 static ExtensionRendererState* GetInstance(); 28 static ExtensionRendererState* GetInstance();
27 29
28 // These are called on the UI thread to start and stop listening to tab 30 // These are called on the UI thread to start and stop listening to tab
29 // notifications. 31 // notifications.
30 void Init(); 32 void Init();
31 void Shutdown(); 33 void Shutdown();
32 34
33 // Looks up the information for the embedder <webview> for a given render 35 // Looks up the information for the embedder <webview> for a given render
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void RemoveWebView(int render_process_host_id, int routing_id); 69 void RemoveWebView(int render_process_host_id, int routing_id);
68 70
69 TabObserver* observer_; 71 TabObserver* observer_;
70 TabAndWindowIdMap map_; 72 TabAndWindowIdMap map_;
71 WebViewInfoMap webview_info_map_; 73 WebViewInfoMap webview_info_map_;
72 74
73 DISALLOW_COPY_AND_ASSIGN(ExtensionRendererState); 75 DISALLOW_COPY_AND_ASSIGN(ExtensionRendererState);
74 }; 76 };
75 77
76 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_RENDERER_STATE_H_ 78 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_RENDERER_STATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_protocols.cc ('k') | chrome/browser/guestview/webview/webview_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698