Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 16 #include "chrome/browser/content_settings/local_shared_objects_container.h" | 16 #include "chrome/browser/content_settings/local_shared_objects_container.h" |
| 17 #include "chrome/browser/geolocation/geolocation_settings_state.h" | 17 #include "chrome/browser/geolocation/geolocation_settings_state.h" |
| 18 #include "chrome/common/content_settings.h" | 18 #include "chrome/common/content_settings.h" |
| 19 #include "chrome/common/content_settings_types.h" | 19 #include "chrome/common/content_settings_types.h" |
| 20 #include "chrome/common/custom_handlers/protocol_handler.h" | |
| 20 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
| 21 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
| 22 #include "content/public/browser/web_contents_observer.h" | 23 #include "content/public/browser/web_contents_observer.h" |
| 23 | 24 |
| 24 class CookiesTreeModel; | 25 class CookiesTreeModel; |
| 25 class Profile; | 26 class Profile; |
| 26 | 27 |
| 27 namespace content { | 28 namespace content { |
| 28 class RenderViewHost; | 29 class RenderViewHost; |
| 29 } | 30 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 162 | 163 |
| 163 const std::set<std::string>& BlockedResourcesForType( | 164 const std::set<std::string>& BlockedResourcesForType( |
| 164 ContentSettingsType content_type) const; | 165 ContentSettingsType content_type) const; |
| 165 | 166 |
| 166 // Returns the GeolocationSettingsState that controls the | 167 // Returns the GeolocationSettingsState that controls the |
| 167 // geolocation API usage on this page. | 168 // geolocation API usage on this page. |
| 168 const GeolocationSettingsState& geolocation_settings_state() const { | 169 const GeolocationSettingsState& geolocation_settings_state() const { |
| 169 return geolocation_settings_state_; | 170 return geolocation_settings_state_; |
| 170 } | 171 } |
| 171 | 172 |
| 173 void SetRegisterProtocolHandlerCalledUngestured(ProtocolHandler handler) { | |
|
koz (OOO until 15th September)
2012/06/21 01:50:53
This code could do with an explanatory comment.
A
Greg Billock
2012/06/21 19:59:11
Done.
| |
| 174 register_protocol_handler_called_ungestured_ = handler; | |
| 175 } | |
| 176 | |
| 177 bool IsRegisterProtocolHandlerCalledUngestured() const { | |
|
koz (OOO until 15th September)
2012/06/21 01:50:53
IsRegisterProtocolHandlerPending()?
Greg Billock
2012/06/21 19:59:11
Killed this in favor of just doing PendingProtocol
| |
| 178 return !register_protocol_handler_called_ungestured_.IsEmpty(); | |
| 179 } | |
| 180 | |
| 181 const ProtocolHandler& UngesturedProtocolHandler() const { | |
|
koz (OOO until 15th September)
2012/06/21 01:50:53
GetPendingProtocolHandler()
Greg Billock
2012/06/21 19:59:11
Done.
| |
| 182 return register_protocol_handler_called_ungestured_; | |
| 183 } | |
| 184 | |
| 185 void SetOldRegisterProtocolHandlerTitle(const string16 title) { | |
|
koz (OOO until 15th September)
2012/06/21 01:50:53
SetProtocolHandlerTitleToBeReplaced()?
Greg Billock
2012/06/21 19:59:11
Called this 'Previous'. Sound good?
koz (OOO until 15th September)
2012/06/21 23:03:50
Yep, sounds fine.
| |
| 186 old_protocol_handler_title_ = title; | |
| 187 } | |
| 188 | |
| 189 const string16& OldRegisterProtocolHandlerTitle() const { | |
|
koz (OOO until 15th September)
2012/06/21 01:50:53
GetProtocolHandlerTitleToBeReplaced()
Greg Billock
2012/06/21 19:59:11
Done.
| |
| 190 return old_protocol_handler_title_; | |
| 191 } | |
| 192 | |
| 172 // Returns a pointer to the |LocalSharedObjectsContainer| that contains all | 193 // Returns a pointer to the |LocalSharedObjectsContainer| that contains all |
| 173 // allowed local shared objects like cookies, local storage, ... . | 194 // allowed local shared objects like cookies, local storage, ... . |
| 174 const LocalSharedObjectsContainer& allowed_local_shared_objects() const { | 195 const LocalSharedObjectsContainer& allowed_local_shared_objects() const { |
| 175 return allowed_local_shared_objects_; | 196 return allowed_local_shared_objects_; |
| 176 } | 197 } |
| 177 | 198 |
| 178 // Returns a pointer to the |LocalSharedObjectsContainer| that contains all | 199 // Returns a pointer to the |LocalSharedObjectsContainer| that contains all |
| 179 // blocked local shared objects like cookies, local storage, ... . | 200 // blocked local shared objects like cookies, local storage, ... . |
| 180 const LocalSharedObjectsContainer& blocked_local_shared_objects() const { | 201 const LocalSharedObjectsContainer& blocked_local_shared_objects() const { |
| 181 return blocked_local_shared_objects_; | 202 return blocked_local_shared_objects_; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 273 // The profile of the tab. | 294 // The profile of the tab. |
| 274 Profile* profile_; | 295 Profile* profile_; |
| 275 | 296 |
| 276 // Stores the blocked/allowed cookies. | 297 // Stores the blocked/allowed cookies. |
| 277 LocalSharedObjectsContainer allowed_local_shared_objects_; | 298 LocalSharedObjectsContainer allowed_local_shared_objects_; |
| 278 LocalSharedObjectsContainer blocked_local_shared_objects_; | 299 LocalSharedObjectsContainer blocked_local_shared_objects_; |
| 279 | 300 |
| 280 // Manages information about Geolocation API usage in this page. | 301 // Manages information about Geolocation API usage in this page. |
| 281 GeolocationSettingsState geolocation_settings_state_; | 302 GeolocationSettingsState geolocation_settings_state_; |
| 282 | 303 |
| 304 // Set to the registered protocol descriptor if registerProtocolHandler was | |
|
koz (OOO until 15th September)
2012/06/21 01:50:53
Maybe rephrase as "The protocol handler that is pe
Greg Billock
2012/06/21 19:59:11
I like it. Making all these changes.
| |
| 305 // called on this tab without a user gesture. The |IsEmpty| method will | |
| 306 // be true if no registration was performed. | |
| 307 ProtocolHandler register_protocol_handler_called_ungestured_; | |
|
koz (OOO until 15th September)
2012/06/21 01:50:53
If the above name changes are followed, this could
Greg Billock
2012/06/21 19:59:11
Done.
| |
| 308 | |
| 309 // If there is an old protocol handler, this is the title. (Used for the | |
|
koz (OOO until 15th September)
2012/06/21 01:50:53
Maybe rephrase this as "The title of the protocol
Greg Billock
2012/06/21 19:59:11
Done.
| |
| 310 // message prompt.) | |
| 311 string16 old_protocol_handler_title_; | |
|
koz (OOO until 15th September)
2012/06/21 01:50:53
protocol_handler_to_be_replaced_title_?
Also, con
Greg Billock
2012/06/21 19:59:11
At this point I don't think we need the whole thin
| |
| 312 | |
| 283 // Stores whether the user can load blocked plugins on this page. | 313 // Stores whether the user can load blocked plugins on this page. |
| 284 bool load_plugins_link_enabled_; | 314 bool load_plugins_link_enabled_; |
| 285 | 315 |
| 286 content::NotificationRegistrar registrar_; | 316 content::NotificationRegistrar registrar_; |
| 287 | 317 |
| 288 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); | 318 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); |
| 289 }; | 319 }; |
| 290 | 320 |
| 291 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 321 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
| OLD | NEW |