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

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

Issue 2171713002: Safe browsing subresource filter bubble UI skeleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Verified xib file Created 4 years, 4 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/macros.h" 10 #include "base/macros.h"
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 } 1140 }
1141 1141
1142 void ContentSettingRPHBubbleModel::ClearOrSetPreviousHandler() { 1142 void ContentSettingRPHBubbleModel::ClearOrSetPreviousHandler() {
1143 if (previous_handler_.IsEmpty()) { 1143 if (previous_handler_.IsEmpty()) {
1144 registry_->ClearDefault(pending_handler_.protocol()); 1144 registry_->ClearDefault(pending_handler_.protocol());
1145 } else { 1145 } else {
1146 registry_->OnAcceptRegisterProtocolHandler(previous_handler_); 1146 registry_->OnAcceptRegisterProtocolHandler(previous_handler_);
1147 } 1147 }
1148 } 1148 }
1149 1149
1150 // ContentSettingSubresourceFilterBubbleModel ----------------------------------
1151
1152 ContentSettingSubresourceFilterBubbleModel::
1153 ContentSettingSubresourceFilterBubbleModel(Delegate* delegate,
1154 WebContents* web_contents,
1155 Profile* profile)
1156 : ContentSettingBubbleModel(delegate, web_contents, profile) {
1157 SetTitle();
1158 SetManageLink();
1159 }
1160
1161 ContentSettingSubresourceFilterBubbleModel::
1162 ~ContentSettingSubresourceFilterBubbleModel() {}
1163
1164 void ContentSettingSubresourceFilterBubbleModel::SetTitle() {
1165 // TODO(melandory): For this bubble we need to introduce ability to have a
1166 // caption (something which appears above title and has bigger font).
1167 set_title(l10n_util::GetStringUTF8(
1168 IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_EXPLANATION));
1169 }
1170
1171 void ContentSettingSubresourceFilterBubbleModel::SetManageLink() {
1172 // TODO(melandory): introduce the button instead of link.
1173 set_manage_link(
1174 l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_RELOAD));
1175 }
1176
1177 void ContentSettingSubresourceFilterBubbleModel::OnManageLinkClicked() {
1178 // TODO(melandory): Notify ContentSubresourceFilterDriverFactory page reload
1179 // was requested.
1180 }
1181
1182 ContentSettingSubresourceFilterBubbleModel*
1183 ContentSettingSubresourceFilterBubbleModel::AsSubresourceFilterBubbleModel() {
1184 return this;
1185 }
1186
1150 // ContentSettingMidiSysExBubbleModel ------------------------------------------ 1187 // ContentSettingMidiSysExBubbleModel ------------------------------------------
1151 1188
1152 class ContentSettingMidiSysExBubbleModel 1189 class ContentSettingMidiSysExBubbleModel
1153 : public ContentSettingSimpleBubbleModel { 1190 : public ContentSettingSimpleBubbleModel {
1154 public: 1191 public:
1155 ContentSettingMidiSysExBubbleModel(Delegate* delegate, 1192 ContentSettingMidiSysExBubbleModel(Delegate* delegate,
1156 WebContents* web_contents, 1193 WebContents* web_contents,
1157 Profile* profile); 1194 Profile* profile);
1158 ~ContentSettingMidiSysExBubbleModel() override {} 1195 ~ContentSettingMidiSysExBubbleModel() override {}
1159 1196
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 ContentSettingBubbleModel::AsSimpleBubbleModel() { 1376 ContentSettingBubbleModel::AsSimpleBubbleModel() {
1340 // In general, bubble models might not inherit from the simple bubble model. 1377 // In general, bubble models might not inherit from the simple bubble model.
1341 return nullptr; 1378 return nullptr;
1342 } 1379 }
1343 1380
1344 ContentSettingMediaStreamBubbleModel* 1381 ContentSettingMediaStreamBubbleModel*
1345 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { 1382 ContentSettingBubbleModel::AsMediaStreamBubbleModel() {
1346 // In general, bubble models might not inherit from the media bubble model. 1383 // In general, bubble models might not inherit from the media bubble model.
1347 return nullptr; 1384 return nullptr;
1348 } 1385 }
1386
1387 ContentSettingSubresourceFilterBubbleModel*
1388 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() {
1389 return nullptr;
1390 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698