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

Side by Side Diff: athena/system/orientation_controller.cc

Issue 571093003: Remove implicit conversions from scoped_refptr to T* in athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | 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 "athena/screen/public/screen_manager.h" 5 #include "athena/screen/public/screen_manager.h"
6 #include "athena/system/orientation_controller.h" 6 #include "athena/system/orientation_controller.h"
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path_watcher.h" 8 #include "base/files/file_path_watcher.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 file_task_runner_ = file_task_runner; 69 file_task_runner_ = file_task_runner;
70 file_task_runner->PostTask( 70 file_task_runner->PostTask(
71 FROM_HERE, 71 FROM_HERE,
72 base::Bind(&OrientationController::WatchForSocketPathOnFILE, this)); 72 base::Bind(&OrientationController::WatchForSocketPathOnFILE, this));
73 } 73 }
74 74
75 OrientationController::~OrientationController() { 75 OrientationController::~OrientationController() {
76 } 76 }
77 77
78 void OrientationController::Shutdown() { 78 void OrientationController::Shutdown() {
79 CHECK(file_task_runner_); 79 CHECK(file_task_runner_.get());
80 StopListening(); 80 StopListening();
81 file_task_runner_->PostTask( 81 file_task_runner_->PostTask(
82 FROM_HERE, 82 FROM_HERE,
83 base::Bind(&OrientationController::ShutdownOnFILE, this)); 83 base::Bind(&OrientationController::ShutdownOnFILE, this));
84 } 84 }
85 85
86 void OrientationController::ShutdownOnFILE() { 86 void OrientationController::ShutdownOnFILE() {
87 shutdown_ = true; 87 shutdown_ = true;
88 watcher_.reset(); 88 watcher_.reset();
89 } 89 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 void OrientationController::RotateOnUI(gfx::Display::Rotation rotation) { 149 void OrientationController::RotateOnUI(gfx::Display::Rotation rotation) {
150 ScreenManager* screen_manager = ScreenManager::Get(); 150 ScreenManager* screen_manager = ScreenManager::Get();
151 // Since this is called from the FILE thread, the screen manager may no longer 151 // Since this is called from the FILE thread, the screen manager may no longer
152 // exist. 152 // exist.
153 if (screen_manager) 153 if (screen_manager)
154 screen_manager->SetRotation(rotation); 154 screen_manager->SetRotation(rotation);
155 } 155 }
156 156
157 } // namespace athena 157 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698