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

Side by Side Diff: chrome/browser/content_settings/tab_specific_content_settings.h

Issue 19375002: Move GeolocationSettingsState to ContentSettingsUsagesState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review #9 Created 7 years, 5 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 | Annotate | Revision Log
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_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 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "chrome/browser/content_settings/content_settings_usages_state.h"
15 #include "chrome/browser/content_settings/local_shared_objects_container.h" 16 #include "chrome/browser/content_settings/local_shared_objects_container.h"
16 #include "chrome/browser/geolocation/geolocation_settings_state.h"
17 #include "chrome/common/content_settings.h" 17 #include "chrome/common/content_settings.h"
18 #include "chrome/common/content_settings_types.h" 18 #include "chrome/common/content_settings_types.h"
19 #include "chrome/common/custom_handlers/protocol_handler.h" 19 #include "chrome/common/custom_handlers/protocol_handler.h"
20 #include "content/public/browser/notification_observer.h" 20 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/notification_registrar.h" 21 #include "content/public/browser/notification_registrar.h"
22 #include "content/public/browser/web_contents_observer.h" 22 #include "content/public/browser/web_contents_observer.h"
23 #include "content/public/browser/web_contents_user_data.h" 23 #include "content/public/browser/web_contents_user_data.h"
24 #include "net/cookies/canonical_cookie.h" 24 #include "net/cookies/canonical_cookie.h"
25 25
26 class CookiesTreeModel; 26 class CookiesTreeModel;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Returns whether a particular kind of content has been allowed. Currently 181 // Returns whether a particular kind of content has been allowed. Currently
182 // only tracks cookies. 182 // only tracks cookies.
183 bool IsContentAllowed(ContentSettingsType content_type) const; 183 bool IsContentAllowed(ContentSettingsType content_type) const;
184 184
185 // Returns the state of the camera and microphone usage. 185 // Returns the state of the camera and microphone usage.
186 MicrophoneCameraState GetMicrophoneCameraState() const; 186 MicrophoneCameraState GetMicrophoneCameraState() const;
187 187
188 const std::set<std::string>& BlockedResourcesForType( 188 const std::set<std::string>& BlockedResourcesForType(
189 ContentSettingsType content_type) const; 189 ContentSettingsType content_type) const;
190 190
191 // Returns the GeolocationSettingsState that controls the 191 // Returns the ContentSettingsUsagesState that controls the
192 // geolocation API usage on this page. 192 // geolocation API usage on this page.
193 const GeolocationSettingsState& geolocation_settings_state() const { 193 const ContentSettingsUsagesState& geolocation_usages_state() const {
194 return geolocation_settings_state_; 194 return geolocation_usages_state_;
195 } 195 }
196 196
197 // Call to indicate that there is a protocol handler pending user approval. 197 // Call to indicate that there is a protocol handler pending user approval.
198 void set_pending_protocol_handler(const ProtocolHandler& handler) { 198 void set_pending_protocol_handler(const ProtocolHandler& handler) {
199 pending_protocol_handler_ = handler; 199 pending_protocol_handler_ = handler;
200 } 200 }
201 201
202 const ProtocolHandler& pending_protocol_handler() const { 202 const ProtocolHandler& pending_protocol_handler() const {
203 return pending_protocol_handler_; 203 return pending_protocol_handler_;
204 } 204 }
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 blocked_resources_[CONTENT_SETTINGS_NUM_TYPES]; 346 blocked_resources_[CONTENT_SETTINGS_NUM_TYPES];
347 347
348 // The profile of the tab. 348 // The profile of the tab.
349 Profile* profile_; 349 Profile* profile_;
350 350
351 // Stores the blocked/allowed cookies. 351 // Stores the blocked/allowed cookies.
352 LocalSharedObjectsContainer allowed_local_shared_objects_; 352 LocalSharedObjectsContainer allowed_local_shared_objects_;
353 LocalSharedObjectsContainer blocked_local_shared_objects_; 353 LocalSharedObjectsContainer blocked_local_shared_objects_;
354 354
355 // Manages information about Geolocation API usage in this page. 355 // Manages information about Geolocation API usage in this page.
356 GeolocationSettingsState geolocation_settings_state_; 356 ContentSettingsUsagesState geolocation_usages_state_;
357 357
358 // The pending protocol handler, if any. This can be set if 358 // The pending protocol handler, if any. This can be set if
359 // registerProtocolHandler was invoked without user gesture. 359 // registerProtocolHandler was invoked without user gesture.
360 // The |IsEmpty| method will be true if no protocol handler is 360 // The |IsEmpty| method will be true if no protocol handler is
361 // pending registration. 361 // pending registration.
362 ProtocolHandler pending_protocol_handler_; 362 ProtocolHandler pending_protocol_handler_;
363 363
364 // The previous protocol handler to be replaced by 364 // The previous protocol handler to be replaced by
365 // the pending_protocol_handler_, if there is one. Empty if 365 // the pending_protocol_handler_, if there is one. Empty if
366 // there is no handler which would be replaced. 366 // there is no handler which would be replaced.
367 ProtocolHandler previous_protocol_handler_; 367 ProtocolHandler previous_protocol_handler_;
368 368
369 // The setting on the pending protocol handler registration. Persisted in case 369 // The setting on the pending protocol handler registration. Persisted in case
370 // the user opens the bubble and makes changes multiple times. 370 // the user opens the bubble and makes changes multiple times.
371 ContentSetting pending_protocol_handler_setting_; 371 ContentSetting pending_protocol_handler_setting_;
372 372
373 // Stores whether the user can load blocked plugins on this page. 373 // Stores whether the user can load blocked plugins on this page.
374 bool load_plugins_link_enabled_; 374 bool load_plugins_link_enabled_;
375 375
376 content::NotificationRegistrar registrar_; 376 content::NotificationRegistrar registrar_;
377 377
378 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); 378 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings);
379 }; 379 };
380 380
381 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ 381 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698