OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gtk/content_setting_bubble_gtk.h" | 5 #include "chrome/browser/ui/gtk/content_setting_bubble_gtk.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 // The maximum width of a title entry in the content box. We elide anything | 36 // The maximum width of a title entry in the content box. We elide anything |
37 // longer than this. | 37 // longer than this. |
38 const int kMaxLinkPixelSize = 500; | 38 const int kMaxLinkPixelSize = 500; |
39 | 39 |
40 std::string BuildElidedText(const std::string& input) { | 40 std::string BuildElidedText(const std::string& input) { |
41 return UTF16ToUTF8(ui::ElideText( | 41 return UTF16ToUTF8(ui::ElideText( |
42 UTF8ToUTF16(input), | 42 UTF8ToUTF16(input), |
43 gfx::Font(), | 43 gfx::Font(), |
44 kMaxLinkPixelSize, | 44 kMaxLinkPixelSize, |
45 false)); | 45 ui::ELIDE_AT_END)); |
46 } | 46 } |
47 | 47 |
48 } // namespace | 48 } // namespace |
49 | 49 |
50 ContentSettingBubbleGtk::ContentSettingBubbleGtk( | 50 ContentSettingBubbleGtk::ContentSettingBubbleGtk( |
51 GtkWidget* anchor, | 51 GtkWidget* anchor, |
52 BubbleDelegateGtk* delegate, | 52 BubbleDelegateGtk* delegate, |
53 ContentSettingBubbleModel* content_setting_bubble_model, | 53 ContentSettingBubbleModel* content_setting_bubble_model, |
54 Profile* profile, | 54 Profile* profile, |
55 TabContents* tab_contents) | 55 TabContents* tab_contents) |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 | 305 |
306 void ContentSettingBubbleGtk::OnCustomLinkClicked(GtkWidget* button) { | 306 void ContentSettingBubbleGtk::OnCustomLinkClicked(GtkWidget* button) { |
307 content_setting_bubble_model_->OnCustomLinkClicked(); | 307 content_setting_bubble_model_->OnCustomLinkClicked(); |
308 Close(); | 308 Close(); |
309 } | 309 } |
310 | 310 |
311 void ContentSettingBubbleGtk::OnManageLinkClicked(GtkWidget* button) { | 311 void ContentSettingBubbleGtk::OnManageLinkClicked(GtkWidget* button) { |
312 content_setting_bubble_model_->OnManageLinkClicked(); | 312 content_setting_bubble_model_->OnManageLinkClicked(); |
313 Close(); | 313 Close(); |
314 } | 314 } |
OLD | NEW |