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

Side by Side Diff: ui/chromeos/ime/infolist_window.cc

Issue 680383008: Move ash/ime to ui/chromeos/ime (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_do_not_use_ash48_global_command
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ime/infolist_window.h" 5 #include "ui/chromeos/ime/infolist_window.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ime/candidate_window_constants.h"
11 #include "base/logging.h" 10 #include "base/logging.h"
12 #include "grit/ash_strings.h"
13 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
12 #include "ui/chromeos/ime/candidate_window_constants.h"
13 #include "ui/chromeos/strings/grit/ui_chromeos_strings.h"
14 #include "ui/gfx/color_utils.h" 14 #include "ui/gfx/color_utils.h"
15 #include "ui/native_theme/native_theme.h" 15 #include "ui/native_theme/native_theme.h"
16 #include "ui/views/background.h" 16 #include "ui/views/background.h"
17 #include "ui/views/border.h" 17 #include "ui/views/border.h"
18 #include "ui/views/bubble/bubble_border.h" 18 #include "ui/views/bubble/bubble_border.h"
19 #include "ui/views/bubble/bubble_frame_view.h" 19 #include "ui/views/bubble/bubble_frame_view.h"
20 #include "ui/views/controls/label.h" 20 #include "ui/views/controls/label.h"
21 #include "ui/views/layout/box_layout.h" 21 #include "ui/views/layout/box_layout.h"
22 #include "ui/views/widget/widget.h" 22 #include "ui/views/widget/widget.h"
23 #include "ui/wm/core/window_animations.h" 23 #include "ui/wm/core/window_animations.h"
24 24
25 namespace ash { 25 namespace ui {
26 namespace ime { 26 namespace ime {
27 27
28 namespace { 28 namespace {
29 // The width of an info-list. 29 // The width of an info-list.
30 const int kInfolistEntryWidth = 200; 30 const int kInfolistEntryWidth = 200;
31 31
32 // The milliseconds of the delay to show the infolist window. 32 // The milliseconds of the delay to show the infolist window.
33 const int kInfolistShowDelayMilliSeconds = 500; 33 const int kInfolistShowDelayMilliSeconds = 500;
34 // The milliseconds of the delay to hide the infolist window. 34 // The milliseconds of the delay to hide the infolist window.
35 const int kInfolistHideDelayMilliSeconds = 500; 35 const int kInfolistHideDelayMilliSeconds = 500;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 views::Background::CreateSolidBackground(GetNativeTheme()->GetSystemColor( 180 views::Background::CreateSolidBackground(GetNativeTheme()->GetSystemColor(
181 ui::NativeTheme::kColorId_WindowBackground))); 181 ui::NativeTheme::kColorId_WindowBackground)));
182 SetBorder(views::Border::CreateSolidBorder( 182 SetBorder(views::Border::CreateSolidBorder(
183 1, 183 1,
184 GetNativeTheme()->GetSystemColor( 184 GetNativeTheme()->GetSystemColor(
185 ui::NativeTheme::kColorId_MenuBorderColor))); 185 ui::NativeTheme::kColorId_MenuBorderColor)));
186 186
187 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); 187 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
188 188
189 views::Label* caption_label = new views::Label( 189 views::Label* caption_label = new views::Label(
190 l10n_util::GetStringUTF16(IDS_ASH_IME_INFOLIST_WINDOW_TITLE)); 190 l10n_util::GetStringUTF16(IDS_CHROMEOS_IME_INFOLIST_WINDOW_TITLE));
191 caption_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 191 caption_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
192 caption_label->SetEnabledColor(GetNativeTheme()->GetSystemColor( 192 caption_label->SetEnabledColor(GetNativeTheme()->GetSystemColor(
193 ui::NativeTheme::kColorId_LabelEnabledColor)); 193 ui::NativeTheme::kColorId_LabelEnabledColor));
194 caption_label->SetBorder(views::Border::CreateEmptyBorder(2, 2, 2, 2)); 194 caption_label->SetBorder(views::Border::CreateEmptyBorder(2, 2, 2, 2));
195 caption_label->set_background(views::Background::CreateSolidBackground( 195 caption_label->set_background(views::Background::CreateSolidBackground(
196 color_utils::AlphaBlend(SK_ColorBLACK, 196 color_utils::AlphaBlend(SK_ColorBLACK,
197 GetNativeTheme()->GetSystemColor( 197 GetNativeTheme()->GetSystemColor(
198 ui::NativeTheme::kColorId_WindowBackground), 198 ui::NativeTheme::kColorId_WindowBackground),
199 0x10))); 199 0x10)));
200 200
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 void InfolistWindow::HideImmediately() { 270 void InfolistWindow::HideImmediately() {
271 show_hide_timer_.Stop(); 271 show_hide_timer_.Stop();
272 GetWidget()->Close(); 272 GetWidget()->Close();
273 } 273 }
274 274
275 void InfolistWindow::WindowClosing() { 275 void InfolistWindow::WindowClosing() {
276 show_hide_timer_.Stop(); 276 show_hide_timer_.Stop();
277 } 277 }
278 278
279 } // namespace ime 279 } // namespace ime
280 } // namespace ash 280 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698