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

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

Issue 23514016: <webview>: Cleanup WebRequest event listeners when embedder destroyed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 7 years, 3 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 <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;
24 int instance_id; 23 int instance_id;
25 }; 24 };
26 25
27 static ExtensionRendererState* GetInstance(); 26 static ExtensionRendererState* GetInstance();
28 27
29 // These are called on the UI thread to start and stop listening to tab 28 // These are called on the UI thread to start and stop listening to tab
30 // notifications. 29 // notifications.
31 void Init(); 30 void Init();
32 void Shutdown(); 31 void Shutdown();
33 32
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void RemoveWebView(int render_process_host_id, int routing_id); 67 void RemoveWebView(int render_process_host_id, int routing_id);
69 68
70 TabObserver* observer_; 69 TabObserver* observer_;
71 TabAndWindowIdMap map_; 70 TabAndWindowIdMap map_;
72 WebViewInfoMap webview_info_map_; 71 WebViewInfoMap webview_info_map_;
73 72
74 DISALLOW_COPY_AND_ASSIGN(ExtensionRendererState); 73 DISALLOW_COPY_AND_ASSIGN(ExtensionRendererState);
75 }; 74 };
76 75
77 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_RENDERER_STATE_H_ 76 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_RENDERER_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698