| 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 menu_width = std::max(menu_width, string_width); | 496 menu_width = std::max(menu_width, string_width); |
| 497 } | 497 } |
| 498 } | 498 } |
| 499 | 499 |
| 500 // Make sure the width is at least kMinMediaMenuButtonWidth. The | 500 // Make sure the width is at least kMinMediaMenuButtonWidth. The |
| 501 // maximum width will be clamped by kMaxContentsWidth of the view. | 501 // maximum width will be clamped by kMaxContentsWidth of the view. |
| 502 menu_width = std::max(kMinMediaMenuButtonWidth, menu_width + margins); | 502 menu_width = std::max(kMinMediaMenuButtonWidth, menu_width + margins); |
| 503 | 503 |
| 504 for (MediaMenuPartsMap::const_iterator i = media_menus_.begin(); | 504 for (MediaMenuPartsMap::const_iterator i = media_menus_.begin(); |
| 505 i != media_menus_.end(); ++i) { | 505 i != media_menus_.end(); ++i) { |
| 506 i->first->set_min_size(gfx::Size(menu_width, 0)); | 506 i->first->SetMinSize(gfx::Size(menu_width, 0)); |
| 507 i->first->set_max_size(gfx::Size(menu_width, 0)); | 507 i->first->SetMaxSize(gfx::Size(menu_width, 0)); |
| 508 } | 508 } |
| 509 } | 509 } |
| OLD | NEW |