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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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
« no previous file with comments | « ui/chromeos/ime/candidate_view_unittest.cc ('k') | ui/chromeos/ime/infolist_window.h » ('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 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/candidate_window_view.h" 5 #include "ui/chromeos/ime/candidate_window_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 CandidateWindowView::~CandidateWindowView() { 190 CandidateWindowView::~CandidateWindowView() {
191 } 191 }
192 192
193 views::Widget* CandidateWindowView::InitWidget() { 193 views::Widget* CandidateWindowView::InitWidget() {
194 views::Widget* widget = BubbleDelegateView::CreateBubble(this); 194 views::Widget* widget = BubbleDelegateView::CreateBubble(this);
195 195
196 wm::SetWindowVisibilityAnimationType( 196 wm::SetWindowVisibilityAnimationType(
197 widget->GetNativeView(), 197 widget->GetNativeView(),
198 wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); 198 wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE);
199 199
200 GetBubbleFrameView()->SetBubbleBorder(scoped_ptr<views::BubbleBorder>( 200 GetBubbleFrameView()->SetBubbleBorder(std::unique_ptr<views::BubbleBorder>(
201 new CandidateWindowBorder(parent_window()))); 201 new CandidateWindowBorder(parent_window())));
202 return widget; 202 return widget;
203 } 203 }
204 204
205 void CandidateWindowView::UpdateVisibility() { 205 void CandidateWindowView::UpdateVisibility() {
206 if (candidate_area_->visible() || auxiliary_text_->visible() || 206 if (candidate_area_->visible() || auxiliary_text_->visible() ||
207 preedit_->visible()) { 207 preedit_->visible()) {
208 SizeToContents(); 208 SizeToContents();
209 } else { 209 } else {
210 GetWidget()->Close(); 210 GetWidget()->Close();
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 for (size_t i = 0; i < candidate_views_.size(); ++i) { 404 for (size_t i = 0; i < candidate_views_.size(); ++i) {
405 if (sender == candidate_views_[i]) { 405 if (sender == candidate_views_[i]) {
406 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); 406 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i));
407 return; 407 return;
408 } 408 }
409 } 409 }
410 } 410 }
411 411
412 } // namespace ime 412 } // namespace ime
413 } // namespace ui 413 } // namespace ui
OLDNEW
« no previous file with comments | « ui/chromeos/ime/candidate_view_unittest.cc ('k') | ui/chromeos/ime/infolist_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698