OLD | NEW |
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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 } | 476 } |
477 | 477 |
478 void ContentSettingBubbleContents::ButtonPressed(views::Button* sender, | 478 void ContentSettingBubbleContents::ButtonPressed(views::Button* sender, |
479 const ui::Event& event) { | 479 const ui::Event& event) { |
480 if (manage_checkbox_ == sender) { | 480 if (manage_checkbox_ == sender) { |
481 content_setting_bubble_model_->OnManageCheckboxChecked( | 481 content_setting_bubble_model_->OnManageCheckboxChecked( |
482 manage_checkbox_->checked()); | 482 manage_checkbox_->checked()); |
483 | 483 |
484 // Toggling the check state may change the dialog button text. | 484 // Toggling the check state may change the dialog button text. |
485 GetDialogClientView()->UpdateDialogButtons(); | 485 GetDialogClientView()->UpdateDialogButtons(); |
| 486 GetDialogClientView()->Layout(); |
486 } else { | 487 } else { |
487 RadioGroup::const_iterator i( | 488 RadioGroup::const_iterator i( |
488 std::find(radio_group_.begin(), radio_group_.end(), sender)); | 489 std::find(radio_group_.begin(), radio_group_.end(), sender)); |
489 DCHECK(i != radio_group_.end()); | 490 DCHECK(i != radio_group_.end()); |
490 content_setting_bubble_model_->OnRadioClicked(i - radio_group_.begin()); | 491 content_setting_bubble_model_->OnRadioClicked(i - radio_group_.begin()); |
491 } | 492 } |
492 } | 493 } |
493 | 494 |
494 void ContentSettingBubbleContents::LinkClicked(views::Link* source, | 495 void ContentSettingBubbleContents::LinkClicked(views::Link* source, |
495 int event_flags) { | 496 int event_flags) { |
(...skipping 19 matching lines...) Expand all Loading... |
515 DCHECK(i != list_item_links_.end()); | 516 DCHECK(i != list_item_links_.end()); |
516 content_setting_bubble_model_->OnListItemClicked(i->second); | 517 content_setting_bubble_model_->OnListItemClicked(i->second); |
517 } | 518 } |
518 | 519 |
519 void ContentSettingBubbleContents::OnPerformAction(views::Combobox* combobox) { | 520 void ContentSettingBubbleContents::OnPerformAction(views::Combobox* combobox) { |
520 MediaComboboxModel* model = | 521 MediaComboboxModel* model = |
521 static_cast<MediaComboboxModel*>(combobox->model()); | 522 static_cast<MediaComboboxModel*>(combobox->model()); |
522 content_setting_bubble_model_->OnMediaMenuClicked( | 523 content_setting_bubble_model_->OnMediaMenuClicked( |
523 model->type(), model->GetDevices()[combobox->selected_index()].id); | 524 model->type(), model->GetDevices()[combobox->selected_index()].id); |
524 } | 525 } |
OLD | NEW |