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

Side by Side Diff: ash/system/ime/tray_ime.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 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 | « ash/system/date/tray_date.cc ('k') | ash/system/logout_button/logout_button_tray.cc » ('j') | 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) 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 "ash/system/ime/tray_ime.h" 5 #include "ash/system/ime/tray_ime.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/metrics/user_metrics_recorder.h" 9 #include "ash/metrics/user_metrics_recorder.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 void AppendIMEProperties(const IMEPropertyInfoList& property_list) { 123 void AppendIMEProperties(const IMEPropertyInfoList& property_list) {
124 property_map_.clear(); 124 property_map_.clear();
125 for (size_t i = 0; i < property_list.size(); i++) { 125 for (size_t i = 0; i < property_list.size(); i++) {
126 HoverHighlightView* container = new HoverHighlightView(this); 126 HoverHighlightView* container = new HoverHighlightView(this);
127 container->AddLabel( 127 container->AddLabel(
128 property_list[i].name, 128 property_list[i].name,
129 property_list[i].selected ? gfx::Font::BOLD : gfx::Font::NORMAL); 129 property_list[i].selected ? gfx::Font::BOLD : gfx::Font::NORMAL);
130 if (i == 0) 130 if (i == 0)
131 container->set_border(views::Border::CreateSolidSidedBorder(1, 0, 0, 0, 131 container->SetBorder(views::Border::CreateSolidSidedBorder(
132 kBorderLightColor)); 132 1, 0, 0, 0, kBorderLightColor));
133 scroll_content()->AddChildView(container); 133 scroll_content()->AddChildView(container);
134 property_map_[container] = property_list[i].key; 134 property_map_[container] = property_list[i].key;
135 } 135 }
136 } 136 }
137 137
138 void AppendSettings() { 138 void AppendSettings() {
139 HoverHighlightView* container = new HoverHighlightView(this); 139 HoverHighlightView* container = new HoverHighlightView(this);
140 container->AddLabel(ui::ResourceBundle::GetSharedInstance(). 140 container->AddLabel(ui::ResourceBundle::GetSharedInstance().
141 GetLocalizedString(IDS_ASH_STATUS_TRAY_IME_SETTINGS), 141 GetLocalizedString(IDS_ASH_STATUS_TRAY_IME_SETTINGS),
142 gfx::Font::NORMAL); 142 gfx::Font::NORMAL);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 default_->UpdateLabel(current); 313 default_->UpdateLabel(current);
314 if (detailed_) 314 if (detailed_)
315 detailed_->Update(list, property_list); 315 detailed_->Update(list, property_list);
316 316
317 if (list.size() > 1 && show_message) 317 if (list.size() > 1 && show_message)
318 UpdateOrCreateNotification(); 318 UpdateOrCreateNotification();
319 } 319 }
320 320
321 } // namespace internal 321 } // namespace internal
322 } // namespace ash 322 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/date/tray_date.cc ('k') | ash/system/logout_button/logout_button_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698