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

Side by Side Diff: remoting/host/input_injector_linux.cc

Issue 16964002: Rewrite scoped_ptr<T>(NULL) to use the default ctor in remoting/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
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 "remoting/host/input_injector.h" 5 #include "remoting/host/input_injector.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 #include <X11/extensions/XTest.h> 8 #include <X11/extensions/XTest.h>
9 #include <X11/extensions/XInput.h> 9 #include <X11/extensions/XInput.h>
10 10
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 } 493 }
494 494
495 } // namespace 495 } // namespace
496 496
497 scoped_ptr<InputInjector> InputInjector::Create( 497 scoped_ptr<InputInjector> InputInjector::Create(
498 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 498 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
499 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 499 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
500 scoped_ptr<InputInjectorLinux> injector( 500 scoped_ptr<InputInjectorLinux> injector(
501 new InputInjectorLinux(main_task_runner)); 501 new InputInjectorLinux(main_task_runner));
502 if (!injector->Init()) 502 if (!injector->Init())
503 return scoped_ptr<InputInjector>(NULL); 503 return scoped_ptr<InputInjector>();
504 return injector.PassAs<InputInjector>(); 504 return injector.PassAs<InputInjector>();
505 } 505 }
506 506
507 } // namespace remoting 507 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698