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 "ui/chromeos/ime/infolist_window.h" | 5 #include "ui/chromeos/ime/infolist_window.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 } | 214 } |
215 | 215 |
216 void InfolistWindow::InitWidget() { | 216 void InfolistWindow::InitWidget() { |
217 views::Widget* widget = views::BubbleDelegateView::CreateBubble(this); | 217 views::Widget* widget = views::BubbleDelegateView::CreateBubble(this); |
218 wm::SetWindowVisibilityAnimationType( | 218 wm::SetWindowVisibilityAnimationType( |
219 widget->GetNativeView(), | 219 widget->GetNativeView(), |
220 wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); | 220 wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); |
221 | 221 |
222 // BubbleFrameView will be initialized through CreateBubble. | 222 // BubbleFrameView will be initialized through CreateBubble. |
223 GetBubbleFrameView()->SetBubbleBorder( | 223 GetBubbleFrameView()->SetBubbleBorder( |
224 scoped_ptr<views::BubbleBorder>(new InfolistBorder())); | 224 std::unique_ptr<views::BubbleBorder>(new InfolistBorder())); |
225 SizeToContents(); | 225 SizeToContents(); |
226 } | 226 } |
227 | 227 |
228 void InfolistWindow::Relayout(const std::vector<ui::InfolistEntry>& entries) { | 228 void InfolistWindow::Relayout(const std::vector<ui::InfolistEntry>& entries) { |
229 size_t i = 0; | 229 size_t i = 0; |
230 for (; i < entries.size(); ++i) { | 230 for (; i < entries.size(); ++i) { |
231 if (i < entry_views_.size()) { | 231 if (i < entry_views_.size()) { |
232 entry_views_[i]->SetEntry(entries[i]); | 232 entry_views_[i]->SetEntry(entries[i]); |
233 } else { | 233 } else { |
234 InfolistEntryView* new_entry = new InfolistEntryView( | 234 InfolistEntryView* new_entry = new InfolistEntryView( |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 const char* InfolistWindow::GetClassName() const { | 278 const char* InfolistWindow::GetClassName() const { |
279 return "InfolistWindow"; | 279 return "InfolistWindow"; |
280 } | 280 } |
281 | 281 |
282 void InfolistWindow::WindowClosing() { | 282 void InfolistWindow::WindowClosing() { |
283 show_hide_timer_.Stop(); | 283 show_hide_timer_.Stop(); |
284 } | 284 } |
285 | 285 |
286 } // namespace ime | 286 } // namespace ime |
287 } // namespace ui | 287 } // namespace ui |
OLD | NEW |