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

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

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/master again, resolved conflicts Created 6 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_ACTIVE_TAB_PERMISSION_GRANTER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVE_TAB_PERMISSION_GRANTER_H_
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVE_TAB_PERMISSION_GRANTER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVE_TAB_PERMISSION_GRANTER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 27 matching lines...) Expand all
38 38
39 // If |extension| has the activeTab or tabCapture permission, grants 39 // If |extension| has the activeTab or tabCapture permission, grants
40 // tab-specific permissions to it until the next page navigation or refresh. 40 // tab-specific permissions to it until the next page navigation or refresh.
41 void GrantIfRequested(const Extension* extension); 41 void GrantIfRequested(const Extension* extension);
42 42
43 private: 43 private:
44 // content::WebContentsObserver implementation. 44 // content::WebContentsObserver implementation.
45 virtual void DidNavigateMainFrame( 45 virtual void DidNavigateMainFrame(
46 const content::LoadCommittedDetails& details, 46 const content::LoadCommittedDetails& details,
47 const content::FrameNavigateParams& params) OVERRIDE; 47 const content::FrameNavigateParams& params) OVERRIDE;
48 virtual void WebContentsDestroyed(content::WebContents* web_contents) 48 virtual void WebContentsDestroyed() OVERRIDE;
49 OVERRIDE;
50 49
51 // extensions::ExtensionRegistryObserver implementation. 50 // extensions::ExtensionRegistryObserver implementation.
52 virtual void OnExtensionUnloaded(content::BrowserContext* browser_context, 51 virtual void OnExtensionUnloaded(content::BrowserContext* browser_context,
53 const Extension* extension, 52 const Extension* extension,
54 UnloadedExtensionInfo::Reason reason) 53 UnloadedExtensionInfo::Reason reason)
55 OVERRIDE; 54 OVERRIDE;
56 55
57 // Clears any tab-specific permissions for all extensions on |tab_id_| and 56 // Clears any tab-specific permissions for all extensions on |tab_id_| and
58 // notifies renderers. 57 // notifies renderers.
59 void ClearActiveExtensionsAndNotify(); 58 void ClearActiveExtensionsAndNotify();
60 59
61 // The tab ID for this tab. 60 // The tab ID for this tab.
62 int tab_id_; 61 int tab_id_;
63 62
64 // Extensions with the activeTab permission that have been granted 63 // Extensions with the activeTab permission that have been granted
65 // tab-specific permissions until the next navigation/refresh. 64 // tab-specific permissions until the next navigation/refresh.
66 ExtensionSet granted_extensions_; 65 ExtensionSet granted_extensions_;
67 66
68 // Listen to extension unloaded notifications. 67 // Listen to extension unloaded notifications.
69 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 68 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
70 extension_registry_observer_; 69 extension_registry_observer_;
71 70
72 DISALLOW_COPY_AND_ASSIGN(ActiveTabPermissionGranter); 71 DISALLOW_COPY_AND_ASSIGN(ActiveTabPermissionGranter);
73 }; 72 };
74 73
75 } // namespace extensions 74 } // namespace extensions
76 75
77 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVE_TAB_PERMISSION_GRANTER_H_ 76 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVE_TAB_PERMISSION_GRANTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_request_limiter.cc ('k') | chrome/browser/extensions/active_tab_permission_granter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698