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/stl_util.h" | 13 #include "base/stl_util.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "chrome/browser/content_settings/host_content_settings_map.h" | 15 #include "chrome/browser/content_settings/host_content_settings_map.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" | 20 #include "chrome/browser/ui/views/browser_dialogs.h" |
21 #include "content/public/browser/notification_source.h" | 21 #include "content/public/browser/notification_source.h" |
22 #include "content/public/browser/notification_types.h" | 22 #include "content/public/browser/notification_types.h" |
23 #include "content/public/browser/plugin_service.h" | 23 #include "content/public/browser/plugin_service.h" |
24 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 int width = button->GetPreferredSize().width(); | 484 int width = button->GetPreferredSize().width(); |
485 for (int i = 0; i < menu_model->GetItemCount(); ++i) { | 485 for (int i = 0; i < menu_model->GetItemCount(); ++i) { |
486 button->SetText(menu_model->GetLabelAt(i)); | 486 button->SetText(menu_model->GetLabelAt(i)); |
487 width = std::max(width, button->GetPreferredSize().width()); | 487 width = std::max(width, button->GetPreferredSize().width()); |
488 } | 488 } |
489 | 489 |
490 // Recover the title for the menu button. | 490 // Recover the title for the menu button. |
491 button->SetText(title); | 491 button->SetText(title); |
492 return width; | 492 return width; |
493 } | 493 } |
OLD | NEW |