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

Side by Side Diff: device/power_save_blocker/power_save_blocker_android.cc

Issue 2146753002: Android: Remove unneeded RegisterNatives() calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android: Don't require RegisterNatives if there are none Created 4 years, 4 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
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 "device/power_save_blocker/power_save_blocker.h" 5 #include "device/power_save_blocker/power_save_blocker.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void PowerSaveBlocker::InitDisplaySleepBlocker( 91 void PowerSaveBlocker::InitDisplaySleepBlocker(
92 const base::WeakPtr<ui::ViewAndroid>& view_android) { 92 const base::WeakPtr<ui::ViewAndroid>& view_android) {
93 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); 93 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
94 if (!view_android) 94 if (!view_android)
95 return; 95 return;
96 96
97 delegate_ = new Delegate(view_android, ui_task_runner_); 97 delegate_ = new Delegate(view_android, ui_task_runner_);
98 delegate_->ApplyBlock(); 98 delegate_->ApplyBlock();
99 } 99 }
100 100
101 bool RegisterPowerSaveBlocker(JNIEnv* env) {
102 return RegisterNativesImpl(env);
103 }
104
105 } // namespace device 101 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698