Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: chrome/browser/ui/gtk/content_setting_bubble_gtk.cc

Issue 8917011: Change signature of |ui::ElideText()|. Add a truncate mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/avatar_menu_item_gtk.cc ('k') | chrome/browser/ui/toolbar/back_forward_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698