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

Side by Side Diff: chrome/browser/ui/views/content_setting_bubble_contents.cc

Issue 10821059: Add done-clicked notification to content settings bubble model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/gtk/content_setting_bubble_gtk.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/views/content_setting_bubble_contents.h" 5 #include "chrome/browser/ui/views/content_setting_bubble_contents.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 layout->AddView(manage_link_); 281 layout->AddView(manage_link_);
282 282
283 close_button_ = new views::NativeTextButton( 283 close_button_ = new views::NativeTextButton(
284 this, l10n_util::GetStringUTF16(IDS_DONE)); 284 this, l10n_util::GetStringUTF16(IDS_DONE));
285 layout->AddView(close_button_); 285 layout->AddView(close_button_);
286 } 286 }
287 287
288 void ContentSettingBubbleContents::ButtonPressed(views::Button* sender, 288 void ContentSettingBubbleContents::ButtonPressed(views::Button* sender,
289 const views::Event& event) { 289 const views::Event& event) {
290 if (sender == close_button_) { 290 if (sender == close_button_) {
291 content_setting_bubble_model_->OnDoneClicked();
291 StartFade(false); 292 StartFade(false);
292 return; 293 return;
293 } 294 }
294 295
295 for (RadioGroup::const_iterator i(radio_group_.begin()); 296 for (RadioGroup::const_iterator i(radio_group_.begin());
296 i != radio_group_.end(); ++i) { 297 i != radio_group_.end(); ++i) {
297 if (sender == *i) { 298 if (sender == *i) {
298 content_setting_bubble_model_->OnRadioClicked(i - radio_group_.begin()); 299 content_setting_bubble_model_->OnRadioClicked(i - radio_group_.begin());
299 return; 300 return;
300 } 301 }
(...skipping 22 matching lines...) Expand all
323 } 324 }
324 325
325 void ContentSettingBubbleContents::Observe( 326 void ContentSettingBubbleContents::Observe(
326 int type, 327 int type,
327 const content::NotificationSource& source, 328 const content::NotificationSource& source,
328 const content::NotificationDetails& details) { 329 const content::NotificationDetails& details) {
329 DCHECK(type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED); 330 DCHECK(type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED);
330 DCHECK(source == content::Source<WebContents>(web_contents_)); 331 DCHECK(source == content::Source<WebContents>(web_contents_));
331 web_contents_ = NULL; 332 web_contents_ = NULL;
332 } 333 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/content_setting_bubble_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698