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/stl_util.h" | 14 #include "base/stl_util.h" |
14 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
15 #include "chrome/browser/plugins/plugin_finder.h" | 16 #include "chrome/browser/plugins/plugin_finder.h" |
16 #include "chrome/browser/plugins/plugin_metadata.h" | 17 #include "chrome/browser/plugins/plugin_metadata.h" |
17 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" | 18 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
18 #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" |
19 #include "chrome/browser/ui/views/browser_dialogs.h" | 20 #include "chrome/browser/ui/views/browser_dialogs.h" |
20 #include "chrome/grit/generated_resources.h" | 21 #include "chrome/grit/generated_resources.h" |
21 #include "components/content_settings/core/browser/host_content_settings_map.h" | 22 #include "components/content_settings/core/browser/host_content_settings_map.h" |
22 #include "content/public/browser/plugin_service.h" | 23 #include "content/public/browser/plugin_service.h" |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 // Make sure the width is at least kMinMediaMenuButtonWidth. The | 491 // Make sure the width is at least kMinMediaMenuButtonWidth. The |
491 // maximum width will be clamped by kMaxContentsWidth of the view. | 492 // maximum width will be clamped by kMaxContentsWidth of the view. |
492 menu_width = std::max(kMinMediaMenuButtonWidth, menu_width + margins); | 493 menu_width = std::max(kMinMediaMenuButtonWidth, menu_width + margins); |
493 | 494 |
494 for (MediaMenuPartsMap::const_iterator i = media_menus_.begin(); | 495 for (MediaMenuPartsMap::const_iterator i = media_menus_.begin(); |
495 i != media_menus_.end(); ++i) { | 496 i != media_menus_.end(); ++i) { |
496 i->first->SetMinSize(gfx::Size(menu_width, 0)); | 497 i->first->SetMinSize(gfx::Size(menu_width, 0)); |
497 i->first->SetMaxSize(gfx::Size(menu_width, 0)); | 498 i->first->SetMaxSize(gfx::Size(menu_width, 0)); |
498 } | 499 } |
499 } | 500 } |
OLD | NEW |