| 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/plugins/plugin_finder.h" | 16 #include "chrome/browser/plugins/plugin_finder.h" |
| 17 #include "chrome/browser/plugins/plugin_metadata.h" | 17 #include "chrome/browser/plugins/plugin_metadata.h" |
| 18 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" | 18 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
| 19 #include "chrome/browser/ui/content_settings/content_setting_media_menu_model.h" | 19 #include "chrome/browser/ui/content_settings/content_setting_media_menu_model.h" |
| 20 #include "chrome/browser/ui/views/browser_dialogs.h" | |
| 21 #include "chrome/grit/generated_resources.h" | 20 #include "chrome/grit/generated_resources.h" |
| 22 #include "components/content_settings/core/browser/host_content_settings_map.h" | 21 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 23 #include "content/public/browser/plugin_service.h" | 22 #include "content/public/browser/plugin_service.h" |
| 24 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
| 25 #include "grit/components_strings.h" | 24 #include "grit/components_strings.h" |
| 26 #include "ui/base/cursor/cursor.h" | 25 #include "ui/base/cursor/cursor.h" |
| 27 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
| 28 #include "ui/base/models/simple_menu_model.h" | 27 #include "ui/base/models/simple_menu_model.h" |
| 29 #include "ui/base/resource/resource_bundle.h" | 28 #include "ui/base/resource/resource_bundle.h" |
| 30 #include "ui/gfx/font_list.h" | 29 #include "ui/gfx/font_list.h" |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 // Make sure the width is at least kMinMediaMenuButtonWidth. The | 491 // Make sure the width is at least kMinMediaMenuButtonWidth. The |
| 493 // maximum width will be clamped by kMaxContentsWidth of the view. | 492 // maximum width will be clamped by kMaxContentsWidth of the view. |
| 494 menu_width = std::max(kMinMediaMenuButtonWidth, menu_width + margins); | 493 menu_width = std::max(kMinMediaMenuButtonWidth, menu_width + margins); |
| 495 | 494 |
| 496 for (MediaMenuPartsMap::const_iterator i = media_menus_.begin(); | 495 for (MediaMenuPartsMap::const_iterator i = media_menus_.begin(); |
| 497 i != media_menus_.end(); ++i) { | 496 i != media_menus_.end(); ++i) { |
| 498 i->first->SetMinSize(gfx::Size(menu_width, 0)); | 497 i->first->SetMinSize(gfx::Size(menu_width, 0)); |
| 499 i->first->SetMaxSize(gfx::Size(menu_width, 0)); | 498 i->first->SetMaxSize(gfx::Size(menu_width, 0)); |
| 500 } | 499 } |
| 501 } | 500 } |
| OLD | NEW |