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

Side by Side Diff: ui/views/corewm/tooltip_controller.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/views/corewm/tooltip_controller.h ('k') | ui/views/corewm/tooltip_controller_unittest.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 "ui/views/corewm/tooltip_controller.h" 5 #include "ui/views/corewm/tooltip_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 break; 117 break;
118 } 118 }
119 return NULL; 119 return NULL;
120 } 120 }
121 121
122 } // namespace 122 } // namespace
123 123
124 //////////////////////////////////////////////////////////////////////////////// 124 ////////////////////////////////////////////////////////////////////////////////
125 // TooltipController public: 125 // TooltipController public:
126 126
127 TooltipController::TooltipController(scoped_ptr<Tooltip> tooltip) 127 TooltipController::TooltipController(std::unique_ptr<Tooltip> tooltip)
128 : tooltip_window_(NULL), 128 : tooltip_window_(NULL),
129 tooltip_id_(NULL), 129 tooltip_id_(NULL),
130 tooltip_window_at_mouse_press_(NULL), 130 tooltip_window_at_mouse_press_(NULL),
131 tooltip_(std::move(tooltip)), 131 tooltip_(std::move(tooltip)),
132 tooltips_enabled_(true) { 132 tooltips_enabled_(true) {
133 tooltip_timer_.Start(FROM_HERE, 133 tooltip_timer_.Start(FROM_HERE,
134 base::TimeDelta::FromMilliseconds(kTooltipTimeoutMs), 134 base::TimeDelta::FromMilliseconds(kTooltipTimeoutMs),
135 this, &TooltipController::TooltipTimerFired); 135 this, &TooltipController::TooltipTimerFired);
136 } 136 }
137 137
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 return; 378 return;
379 if (tooltip_window_) 379 if (tooltip_window_)
380 tooltip_window_->RemoveObserver(this); 380 tooltip_window_->RemoveObserver(this);
381 tooltip_window_ = target; 381 tooltip_window_ = target;
382 if (tooltip_window_) 382 if (tooltip_window_)
383 tooltip_window_->AddObserver(this); 383 tooltip_window_->AddObserver(this);
384 } 384 }
385 385
386 } // namespace corewm 386 } // namespace corewm
387 } // namespace views 387 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/corewm/tooltip_controller.h ('k') | ui/views/corewm/tooltip_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698