OLD | NEW |
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/candidate_window_view.h" | 5 #include "ash/ime/candidate_window_view.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "ash/ime/candidate_view.h" | 9 #include "ash/ime/candidate_view.h" |
10 #include "ash/ime/candidate_window_constants.h" | 10 #include "ash/ime/candidate_window_constants.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 int min_width_; | 141 int min_width_; |
142 | 142 |
143 DISALLOW_COPY_AND_ASSIGN(InformationTextArea); | 143 DISALLOW_COPY_AND_ASSIGN(InformationTextArea); |
144 }; | 144 }; |
145 | 145 |
146 CandidateWindowView::CandidateWindowView(gfx::NativeView parent) | 146 CandidateWindowView::CandidateWindowView(gfx::NativeView parent) |
147 : selected_candidate_index_in_page_(-1), | 147 : selected_candidate_index_in_page_(-1), |
148 should_show_at_composition_head_(false), | 148 should_show_at_composition_head_(false), |
149 should_show_upper_side_(false), | 149 should_show_upper_side_(false), |
150 was_candidate_window_open_(false) { | 150 was_candidate_window_open_(false) { |
151 set_use_focusless(true); | 151 set_can_activate(false); |
152 set_parent_window(parent); | 152 set_parent_window(parent); |
153 set_margins(gfx::Insets()); | 153 set_margins(gfx::Insets()); |
154 | 154 |
155 // Set the background and the border of the view. | 155 // Set the background and the border of the view. |
156 ui::NativeTheme* theme = GetNativeTheme(); | 156 ui::NativeTheme* theme = GetNativeTheme(); |
157 set_background( | 157 set_background( |
158 views::Background::CreateSolidBackground(theme->GetSystemColor( | 158 views::Background::CreateSolidBackground(theme->GetSystemColor( |
159 ui::NativeTheme::kColorId_WindowBackground))); | 159 ui::NativeTheme::kColorId_WindowBackground))); |
160 SetBorder(views::Border::CreateSolidBorder( | 160 SetBorder(views::Border::CreateSolidBorder( |
161 1, theme->GetSystemColor(ui::NativeTheme::kColorId_MenuBorderColor))); | 161 1, theme->GetSystemColor(ui::NativeTheme::kColorId_MenuBorderColor))); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 for (size_t i = 0; i < candidate_views_.size(); ++i) { | 399 for (size_t i = 0; i < candidate_views_.size(); ++i) { |
400 if (sender == candidate_views_[i]) { | 400 if (sender == candidate_views_[i]) { |
401 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); | 401 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); |
402 return; | 402 return; |
403 } | 403 } |
404 } | 404 } |
405 } | 405 } |
406 | 406 |
407 } // namespace ime | 407 } // namespace ime |
408 } // namespace ash | 408 } // namespace ash |
OLD | NEW |