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 "base/time/default_tick_clock.h" | 5 #include "base/time/default_tick_clock.h" |
6 #include "ui/display/chromeos/x11/native_display_event_dispatcher_x11.h" | 6 #include "ui/display/chromeos/x11/native_display_event_dispatcher_x11.h" |
7 #include "ui/display/chromeos/x11/display_mode_x11.h" | 7 #include "ui/display/chromeos/x11/display_mode_x11.h" |
8 #include "ui/display/chromeos/x11/display_snapshot_x11.h" | 8 #include "ui/display/chromeos/x11/display_snapshot_x11.h" |
9 #include "ui/events/platform/platform_event_source.h" | 9 #include "ui/events/platform/platform_event_source.h" |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 return ui::POST_DISPATCH_PERFORM_DEFAULT; | 92 return ui::POST_DISPATCH_PERFORM_DEFAULT; |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
96 delegate_->NotifyDisplayObservers(); | 96 delegate_->NotifyDisplayObservers(); |
97 | 97 |
98 return ui::POST_DISPATCH_PERFORM_DEFAULT; | 98 return ui::POST_DISPATCH_PERFORM_DEFAULT; |
99 } | 99 } |
100 | 100 |
101 void NativeDisplayEventDispatcherX11::SetTickClockForTest( | 101 void NativeDisplayEventDispatcherX11::SetTickClockForTest( |
102 scoped_ptr<base::TickClock> tick_clock) { | 102 scoped_refptr<base::TickClock> tick_clock) { |
103 tick_clock_ = tick_clock.Pass(); | 103 tick_clock_.swap(tick_clock); |
Daniel Erat
2014/10/21 16:30:10
why swap() instead of just assigning it?
rkc
2014/10/21 16:54:42
I was trying to follow this pattern that is being
| |
104 startup_time_ = tick_clock_->NowTicks(); | 104 startup_time_ = tick_clock_->NowTicks(); |
105 } | 105 } |
106 | 106 |
107 } // namespace ui | 107 } // namespace ui |
OLD | NEW |