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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 2890253002: [subresource_filter] Move OnReloadRequested to the ChromeClient (Closed)
Patch Set: remove from the base class Created 3 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 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 5 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 29 matching lines...) Expand all
40 #include "chrome/common/render_messages.h" 40 #include "chrome/common/render_messages.h"
41 #include "chrome/grit/generated_resources.h" 41 #include "chrome/grit/generated_resources.h"
42 #include "chrome/grit/theme_resources.h" 42 #include "chrome/grit/theme_resources.h"
43 #include "components/content_settings/core/browser/content_settings_utils.h" 43 #include "components/content_settings/core/browser/content_settings_utils.h"
44 #include "components/content_settings/core/browser/cookie_settings.h" 44 #include "components/content_settings/core/browser/cookie_settings.h"
45 #include "components/content_settings/core/common/content_settings.h" 45 #include "components/content_settings/core/common/content_settings.h"
46 #include "components/prefs/pref_service.h" 46 #include "components/prefs/pref_service.h"
47 #include "components/rappor/public/rappor_utils.h" 47 #include "components/rappor/public/rappor_utils.h"
48 #include "components/rappor/rappor_service_impl.h" 48 #include "components/rappor/rappor_service_impl.h"
49 #include "components/strings/grit/components_strings.h" 49 #include "components/strings/grit/components_strings.h"
50 #include "components/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h"
51 #include "components/url_formatter/elide_url.h" 50 #include "components/url_formatter/elide_url.h"
52 #include "content/public/browser/notification_service.h" 51 #include "content/public/browser/notification_service.h"
53 #include "content/public/browser/render_frame_host.h" 52 #include "content/public/browser/render_frame_host.h"
54 #include "content/public/browser/render_process_host.h" 53 #include "content/public/browser/render_process_host.h"
55 #include "content/public/browser/render_view_host.h" 54 #include "content/public/browser/render_view_host.h"
56 #include "content/public/browser/web_contents.h" 55 #include "content/public/browser/web_contents.h"
57 #include "content/public/browser/web_contents_delegate.h" 56 #include "content/public/browser/web_contents_delegate.h"
58 #include "content/public/common/origin_util.h" 57 #include "content/public/common/origin_util.h"
59 #include "ppapi/features/features.h" 58 #include "ppapi/features/features.h"
60 #include "services/service_manager/public/cpp/interface_provider.h" 59 #include "services/service_manager/public/cpp/interface_provider.h"
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 bool is_checked) { 1259 bool is_checked) {
1261 if (is_checked) 1260 if (is_checked)
1262 set_done_button_text(l10n_util::GetStringUTF16(IDS_APP_MENU_RELOAD)); 1261 set_done_button_text(l10n_util::GetStringUTF16(IDS_APP_MENU_RELOAD));
1263 else 1262 else
1264 set_done_button_text(base::string16()); 1263 set_done_button_text(base::string16());
1265 is_checked_ = is_checked; 1264 is_checked_ = is_checked;
1266 } 1265 }
1267 1266
1268 void ContentSettingSubresourceFilterBubbleModel::OnDoneClicked() { 1267 void ContentSettingSubresourceFilterBubbleModel::OnDoneClicked() {
1269 if (is_checked_) { 1268 if (is_checked_) {
1270 auto* driver_factory = subresource_filter:: 1269 ChromeSubresourceFilterClient::FromWebContents(web_contents())
Bryan McQuade 2017/05/19 13:24:21 same
Charlie Harrison 2017/05/19 13:35:00 Actually I'm less sure about this one, it's hard f
Peter Kasting 2017/05/19 17:18:13 I think you meant to ask about the filter client?
Charlie Harrison 2017/05/19 17:25:50 The filter client is scoped to a WebContents, and
Peter Kasting 2017/05/19 17:31:52 That listener is really confusing. I'd look at wh
Charlie Harrison 2017/05/19 17:39:06 Thanks for the clear explanation, that aligns with
1271 ContentSubresourceFilterDriverFactory::FromWebContents(web_contents()); 1270 ->OnReloadRequested();
1272 driver_factory->OnReloadRequested();
1273 } 1271 }
1274 } 1272 }
1275 1273
1276 ContentSettingSubresourceFilterBubbleModel* 1274 ContentSettingSubresourceFilterBubbleModel*
1277 ContentSettingSubresourceFilterBubbleModel::AsSubresourceFilterBubbleModel() { 1275 ContentSettingSubresourceFilterBubbleModel::AsSubresourceFilterBubbleModel() {
1278 return this; 1276 return this;
1279 } 1277 }
1280 1278
1281 // ContentSettingMidiSysExBubbleModel ------------------------------------------ 1279 // ContentSettingMidiSysExBubbleModel ------------------------------------------
1282 1280
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 1596
1599 ContentSettingSubresourceFilterBubbleModel* 1597 ContentSettingSubresourceFilterBubbleModel*
1600 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { 1598 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() {
1601 return nullptr; 1599 return nullptr;
1602 } 1600 }
1603 1601
1604 ContentSettingDownloadsBubbleModel* 1602 ContentSettingDownloadsBubbleModel*
1605 ContentSettingBubbleModel::AsDownloadsBubbleModel() { 1603 ContentSettingBubbleModel::AsDownloadsBubbleModel() {
1606 return nullptr; 1604 return nullptr;
1607 } 1605 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698