OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CONTENT_SETTINGS_PERMISSION_CONTEXT_BASE_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_BASE_H_ |
6 #define CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_BASE_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_BASE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/containers/scoped_ptr_hash_map.h" | 9 #include "base/containers/scoped_ptr_hash_map.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 const GURL& embedding_origin, | 123 const GURL& embedding_origin, |
124 ContentSetting content_setting); | 124 ContentSetting content_setting); |
125 | 125 |
126 private: | 126 private: |
127 // Called when a bubble is no longer used so it can be cleaned up. | 127 // Called when a bubble is no longer used so it can be cleaned up. |
128 void CleanUpBubble(const PermissionRequestID& id); | 128 void CleanUpBubble(const PermissionRequestID& id); |
129 | 129 |
130 Profile* profile_; | 130 Profile* profile_; |
131 const ContentSettingsType permission_type_; | 131 const ContentSettingsType permission_type_; |
132 scoped_ptr<PermissionQueueController> permission_queue_controller_; | 132 scoped_ptr<PermissionQueueController> permission_queue_controller_; |
133 base::ScopedPtrHashMap<std::string, PermissionBubbleRequest> | 133 base::ScopedPtrHashMap<std::string, scoped_ptr<PermissionBubbleRequest>> |
134 pending_bubbles_; | 134 pending_bubbles_; |
135 | 135 |
136 // Must be the last member, to ensure that it will be | 136 // Must be the last member, to ensure that it will be |
137 // destroyed first, which will invalidate weak pointers | 137 // destroyed first, which will invalidate weak pointers |
138 base::WeakPtrFactory<PermissionContextBase> weak_factory_; | 138 base::WeakPtrFactory<PermissionContextBase> weak_factory_; |
139 }; | 139 }; |
140 | 140 |
141 #endif // CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_BASE_H_ | 141 #endif // CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_BASE_H_ |
OLD | NEW |