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

Side by Side Diff: views/window/custom_frame_view.cc

Issue 6192007: Remove wstring from views. Part 3: Switch accessibility strings to string16.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months 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
« no previous file with comments | « views/view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "views/window/custom_frame_view.h" 5 #include "views/window/custom_frame_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "gfx/canvas.h" 10 #include "gfx/canvas.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 ALLOW_THIS_IN_INITIALIZER_LIST(minimize_button_(new ImageButton(this))), 71 ALLOW_THIS_IN_INITIALIZER_LIST(minimize_button_(new ImageButton(this))),
72 window_icon_(NULL), 72 window_icon_(NULL),
73 should_show_minmax_buttons_(false), 73 should_show_minmax_buttons_(false),
74 should_show_client_edge_(false), 74 should_show_client_edge_(false),
75 frame_(frame) { 75 frame_(frame) {
76 InitClass(); 76 InitClass();
77 77
78 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 78 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
79 79
80 close_button_->SetAccessibleName( 80 close_button_->SetAccessibleName(
81 UTF16ToWide(l10n_util::GetStringUTF16(IDS_APP_ACCNAME_CLOSE))); 81 l10n_util::GetStringUTF16(IDS_APP_ACCNAME_CLOSE));
82 82
83 // Close button images will be set in LayoutWindowControls(). 83 // Close button images will be set in LayoutWindowControls().
84 AddChildView(close_button_); 84 AddChildView(close_button_);
85 85
86 restore_button_->SetAccessibleName( 86 restore_button_->SetAccessibleName(
87 UTF16ToWide(l10n_util::GetStringUTF16(IDS_APP_ACCNAME_RESTORE))); 87 l10n_util::GetStringUTF16(IDS_APP_ACCNAME_RESTORE));
88 restore_button_->SetImage(CustomButton::BS_NORMAL, 88 restore_button_->SetImage(CustomButton::BS_NORMAL,
89 rb.GetBitmapNamed(IDR_RESTORE)); 89 rb.GetBitmapNamed(IDR_RESTORE));
90 restore_button_->SetImage(CustomButton::BS_HOT, 90 restore_button_->SetImage(CustomButton::BS_HOT,
91 rb.GetBitmapNamed(IDR_RESTORE_H)); 91 rb.GetBitmapNamed(IDR_RESTORE_H));
92 restore_button_->SetImage(CustomButton::BS_PUSHED, 92 restore_button_->SetImage(CustomButton::BS_PUSHED,
93 rb.GetBitmapNamed(IDR_RESTORE_P)); 93 rb.GetBitmapNamed(IDR_RESTORE_P));
94 AddChildView(restore_button_); 94 AddChildView(restore_button_);
95 95
96 maximize_button_->SetAccessibleName( 96 maximize_button_->SetAccessibleName(
97 UTF16ToWide(l10n_util::GetStringUTF16(IDS_APP_ACCNAME_MAXIMIZE))); 97 l10n_util::GetStringUTF16(IDS_APP_ACCNAME_MAXIMIZE));
98 maximize_button_->SetImage(CustomButton::BS_NORMAL, 98 maximize_button_->SetImage(CustomButton::BS_NORMAL,
99 rb.GetBitmapNamed(IDR_MAXIMIZE)); 99 rb.GetBitmapNamed(IDR_MAXIMIZE));
100 maximize_button_->SetImage(CustomButton::BS_HOT, 100 maximize_button_->SetImage(CustomButton::BS_HOT,
101 rb.GetBitmapNamed(IDR_MAXIMIZE_H)); 101 rb.GetBitmapNamed(IDR_MAXIMIZE_H));
102 maximize_button_->SetImage(CustomButton::BS_PUSHED, 102 maximize_button_->SetImage(CustomButton::BS_PUSHED,
103 rb.GetBitmapNamed(IDR_MAXIMIZE_P)); 103 rb.GetBitmapNamed(IDR_MAXIMIZE_P));
104 AddChildView(maximize_button_); 104 AddChildView(maximize_button_);
105 105
106 minimize_button_->SetAccessibleName( 106 minimize_button_->SetAccessibleName(
107 UTF16ToWide(l10n_util::GetStringUTF16(IDS_APP_ACCNAME_MINIMIZE))); 107 l10n_util::GetStringUTF16(IDS_APP_ACCNAME_MINIMIZE));
108 minimize_button_->SetImage(CustomButton::BS_NORMAL, 108 minimize_button_->SetImage(CustomButton::BS_NORMAL,
109 rb.GetBitmapNamed(IDR_MINIMIZE)); 109 rb.GetBitmapNamed(IDR_MINIMIZE));
110 minimize_button_->SetImage(CustomButton::BS_HOT, 110 minimize_button_->SetImage(CustomButton::BS_HOT,
111 rb.GetBitmapNamed(IDR_MINIMIZE_H)); 111 rb.GetBitmapNamed(IDR_MINIMIZE_H));
112 minimize_button_->SetImage(CustomButton::BS_PUSHED, 112 minimize_button_->SetImage(CustomButton::BS_PUSHED,
113 rb.GetBitmapNamed(IDR_MINIMIZE_P)); 113 rb.GetBitmapNamed(IDR_MINIMIZE_P));
114 AddChildView(minimize_button_); 114 AddChildView(minimize_button_);
115 115
116 views::WindowDelegate* d = frame_->GetDelegate(); 116 views::WindowDelegate* d = frame_->GetDelegate();
117 should_show_minmax_buttons_ = d->CanMaximize(); 117 should_show_minmax_buttons_ = d->CanMaximize();
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 title_font_ = new gfx::Font(app::win::GetWindowTitleFont()); 574 title_font_ = new gfx::Font(app::win::GetWindowTitleFont());
575 #elif defined(OS_LINUX) 575 #elif defined(OS_LINUX)
576 // TODO(ben): need to resolve what font this is. 576 // TODO(ben): need to resolve what font this is.
577 title_font_ = new gfx::Font(); 577 title_font_ = new gfx::Font();
578 #endif 578 #endif
579 initialized = true; 579 initialized = true;
580 } 580 }
581 } 581 }
582 582
583 } // namespace views 583 } // namespace views
OLDNEW
« no previous file with comments | « views/view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698