| 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> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 16 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 17 #include "chrome/browser/plugins/plugin_finder.h" | 17 #include "chrome/browser/plugins/plugin_finder.h" |
| 18 #include "chrome/browser/plugins/plugin_metadata.h" | 18 #include "chrome/browser/plugins/plugin_metadata.h" |
| 19 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" | 19 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
| 20 #include "chrome/browser/ui/layout_constants.h" | 20 #include "chrome/browser/ui/layout_constants.h" |
| 21 #include "chrome/grit/generated_resources.h" | 21 #include "chrome/grit/generated_resources.h" |
| 22 #include "components/content_settings/core/browser/host_content_settings_map.h" | 22 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 23 #include "components/strings/grit/components_strings.h" |
| 23 #include "content/public/browser/plugin_service.h" | 24 #include "content/public/browser/plugin_service.h" |
| 24 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
| 25 #include "grit/components_strings.h" | |
| 26 #include "ui/base/cursor/cursor.h" | 26 #include "ui/base/cursor/cursor.h" |
| 27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
| 28 #include "ui/base/models/simple_menu_model.h" | 28 #include "ui/base/models/simple_menu_model.h" |
| 29 #include "ui/base/resource/resource_bundle.h" | 29 #include "ui/base/resource/resource_bundle.h" |
| 30 #include "ui/gfx/font_list.h" | 30 #include "ui/gfx/font_list.h" |
| 31 #include "ui/gfx/text_utils.h" | 31 #include "ui/gfx/text_utils.h" |
| 32 #include "ui/views/controls/button/menu_button.h" | 32 #include "ui/views/controls/button/menu_button.h" |
| 33 #include "ui/views/controls/button/radio_button.h" | 33 #include "ui/views/controls/button/radio_button.h" |
| 34 #include "ui/views/controls/combobox/combobox.h" | 34 #include "ui/views/controls/combobox/combobox.h" |
| 35 #include "ui/views/controls/image_view.h" | 35 #include "ui/views/controls/image_view.h" |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 DCHECK(i != list_item_links_.end()); | 445 DCHECK(i != list_item_links_.end()); |
| 446 content_setting_bubble_model_->OnListItemClicked(i->second); | 446 content_setting_bubble_model_->OnListItemClicked(i->second); |
| 447 } | 447 } |
| 448 | 448 |
| 449 void ContentSettingBubbleContents::OnPerformAction(views::Combobox* combobox) { | 449 void ContentSettingBubbleContents::OnPerformAction(views::Combobox* combobox) { |
| 450 MediaComboboxModel* model = | 450 MediaComboboxModel* model = |
| 451 static_cast<MediaComboboxModel*>(combobox->model()); | 451 static_cast<MediaComboboxModel*>(combobox->model()); |
| 452 content_setting_bubble_model_->OnMediaMenuClicked( | 452 content_setting_bubble_model_->OnMediaMenuClicked( |
| 453 model->type(), model->GetDevices()[combobox->selected_index()].id); | 453 model->type(), model->GetDevices()[combobox->selected_index()].id); |
| 454 } | 454 } |
| OLD | NEW |