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

Side by Side Diff: ui/views/corewm/tooltip_controller.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/controls/webview/webview.cc ('k') | ui/views/examples/examples_window.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 <utility>
7 #include <vector> 8 #include <vector>
8 9
9 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
10 #include "base/time/time.h" 11 #include "base/time/time.h"
11 #include "ui/aura/client/capture_client.h" 12 #include "ui/aura/client/capture_client.h"
12 #include "ui/aura/client/cursor_client.h" 13 #include "ui/aura/client/cursor_client.h"
13 #include "ui/aura/client/screen_position_client.h" 14 #include "ui/aura/client/screen_position_client.h"
14 #include "ui/aura/env.h" 15 #include "ui/aura/env.h"
15 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
16 #include "ui/events/event.h" 17 #include "ui/events/event.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 118
118 } // namespace 119 } // namespace
119 120
120 //////////////////////////////////////////////////////////////////////////////// 121 ////////////////////////////////////////////////////////////////////////////////
121 // TooltipController public: 122 // TooltipController public:
122 123
123 TooltipController::TooltipController(scoped_ptr<Tooltip> tooltip) 124 TooltipController::TooltipController(scoped_ptr<Tooltip> tooltip)
124 : tooltip_window_(NULL), 125 : tooltip_window_(NULL),
125 tooltip_id_(NULL), 126 tooltip_id_(NULL),
126 tooltip_window_at_mouse_press_(NULL), 127 tooltip_window_at_mouse_press_(NULL),
127 tooltip_(tooltip.Pass()), 128 tooltip_(std::move(tooltip)),
128 tooltips_enabled_(true) { 129 tooltips_enabled_(true) {
129 tooltip_timer_.Start(FROM_HERE, 130 tooltip_timer_.Start(FROM_HERE,
130 base::TimeDelta::FromMilliseconds(kTooltipTimeoutMs), 131 base::TimeDelta::FromMilliseconds(kTooltipTimeoutMs),
131 this, &TooltipController::TooltipTimerFired); 132 this, &TooltipController::TooltipTimerFired);
132 } 133 }
133 134
134 TooltipController::~TooltipController() { 135 TooltipController::~TooltipController() {
135 if (tooltip_window_) 136 if (tooltip_window_)
136 tooltip_window_->RemoveObserver(this); 137 tooltip_window_->RemoveObserver(this);
137 } 138 }
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 return; 372 return;
372 if (tooltip_window_) 373 if (tooltip_window_)
373 tooltip_window_->RemoveObserver(this); 374 tooltip_window_->RemoveObserver(this);
374 tooltip_window_ = target; 375 tooltip_window_ = target;
375 if (tooltip_window_) 376 if (tooltip_window_)
376 tooltip_window_->AddObserver(this); 377 tooltip_window_->AddObserver(this);
377 } 378 }
378 379
379 } // namespace corewm 380 } // namespace corewm
380 } // namespace views 381 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/webview/webview.cc ('k') | ui/views/examples/examples_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698