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

Side by Side Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 5574001: Move ContentSettingsDetails and Pattern out of HostContentSettingsMap as separate classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/content_settings
Patch Set: updates Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/browser/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 11 matching lines...) Expand all
22 #include "base/utf_string_conversions.h" 22 #include "base/utf_string_conversions.h"
23 #include "base/time.h" 23 #include "base/time.h"
24 #include "chrome/browser/autocomplete_history_manager.h" 24 #include "chrome/browser/autocomplete_history_manager.h"
25 #include "chrome/browser/autofill/autofill_manager.h" 25 #include "chrome/browser/autofill/autofill_manager.h"
26 #include "chrome/browser/blocked_content_container.h" 26 #include "chrome/browser/blocked_content_container.h"
27 #include "chrome/browser/bookmarks/bookmark_model.h" 27 #include "chrome/browser/bookmarks/bookmark_model.h"
28 #include "chrome/browser/browser_process.h" 28 #include "chrome/browser/browser_process.h"
29 #include "chrome/browser/browser_shutdown.h" 29 #include "chrome/browser/browser_shutdown.h"
30 #include "chrome/browser/cert_store.h" 30 #include "chrome/browser/cert_store.h"
31 #include "chrome/browser/character_encoding.h" 31 #include "chrome/browser/character_encoding.h"
32 #include "chrome/browser/content_settings/content_settings_details.h"
32 #include "chrome/browser/content_settings/host_content_settings_map.h" 33 #include "chrome/browser/content_settings/host_content_settings_map.h"
33 #include "chrome/browser/debugger/devtools_manager.h" 34 #include "chrome/browser/debugger/devtools_manager.h"
34 #include "chrome/browser/defaults.h" 35 #include "chrome/browser/defaults.h"
35 #include "chrome/browser/dom_operation_notification_details.h" 36 #include "chrome/browser/dom_operation_notification_details.h"
36 #include "chrome/browser/dom_ui/dom_ui.h" 37 #include "chrome/browser/dom_ui/dom_ui.h"
37 #include "chrome/browser/dom_ui/dom_ui_factory.h" 38 #include "chrome/browser/dom_ui/dom_ui_factory.h"
38 #include "chrome/browser/download/download_item_model.h" 39 #include "chrome/browser/download/download_item_model.h"
39 #include "chrome/browser/download/download_manager.h" 40 #include "chrome/browser/download/download_manager.h"
40 #include "chrome/browser/download/download_request_limiter.h" 41 #include "chrome/browser/download/download_request_limiter.h"
41 #include "chrome/browser/external_protocol_handler.h" 42 #include "chrome/browser/external_protocol_handler.h"
(...skipping 3088 matching lines...) Expand 10 before | Expand all | Expand 10 after
3130 render_view_host()->SyncRendererPrefs(); 3131 render_view_host()->SyncRendererPrefs();
3131 break; 3132 break;
3132 } 3133 }
3133 #endif 3134 #endif
3134 3135
3135 case NotificationType::USER_STYLE_SHEET_UPDATED: 3136 case NotificationType::USER_STYLE_SHEET_UPDATED:
3136 UpdateWebPreferences(); 3137 UpdateWebPreferences();
3137 break; 3138 break;
3138 3139
3139 case NotificationType::CONTENT_SETTINGS_CHANGED: { 3140 case NotificationType::CONTENT_SETTINGS_CHANGED: {
3140 Details<const HostContentSettingsMap::ContentSettingsDetails> 3141 Details<const ContentSettingsDetails> settings_details(details);
3141 settings_details(details);
3142 NavigationEntry* entry = controller_.GetActiveEntry(); 3142 NavigationEntry* entry = controller_.GetActiveEntry();
3143 GURL entry_url; 3143 GURL entry_url;
3144 if (entry) 3144 if (entry)
3145 entry_url = entry->url(); 3145 entry_url = entry->url();
3146 if (settings_details.ptr()->update_all() || 3146 if (settings_details.ptr()->update_all() ||
3147 settings_details.ptr()->pattern().Matches(entry_url)) { 3147 settings_details.ptr()->pattern().Matches(entry_url)) {
3148 render_view_host()->SendContentSettings(entry_url, 3148 render_view_host()->SendContentSettings(entry_url,
3149 profile()->GetHostContentSettingsMap()-> 3149 profile()->GetHostContentSettingsMap()->
3150 GetContentSettings(entry_url)); 3150 GetContentSettings(entry_url));
3151 } 3151 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
3235 } 3235 }
3236 3236
3237 void TabContents::set_encoding(const std::string& encoding) { 3237 void TabContents::set_encoding(const std::string& encoding) {
3238 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); 3238 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding);
3239 } 3239 }
3240 3240
3241 void TabContents::SetAppIcon(const SkBitmap& app_icon) { 3241 void TabContents::SetAppIcon(const SkBitmap& app_icon) {
3242 app_icon_ = app_icon; 3242 app_icon_ = app_icon;
3243 NotifyNavigationStateChanged(INVALIDATE_TITLE); 3243 NotifyNavigationStateChanged(INVALIDATE_TITLE);
3244 } 3244 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698