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

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

Issue 2209993003: Add missing using statements for JNI types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "jni/PowerSaveBlocker_jni.h" 12 #include "jni/PowerSaveBlocker_jni.h"
13 #include "ui/android/view_android.h" 13 #include "ui/android/view_android.h"
14 14
15 namespace device { 15 namespace device {
16 16
17 using base::android::AttachCurrentThread; 17 using base::android::AttachCurrentThread;
18 using base::android::ScopedJavaLocalRef;
18 19
19 class PowerSaveBlocker::Delegate 20 class PowerSaveBlocker::Delegate
20 : public base::RefCountedThreadSafe<PowerSaveBlocker::Delegate> { 21 : public base::RefCountedThreadSafe<PowerSaveBlocker::Delegate> {
21 public: 22 public:
22 Delegate(base::WeakPtr<ui::ViewAndroid> view_android, 23 Delegate(base::WeakPtr<ui::ViewAndroid> view_android,
23 scoped_refptr<base::SequencedTaskRunner> ui_task_runner); 24 scoped_refptr<base::SequencedTaskRunner> ui_task_runner);
24 25
25 // Does the actual work to apply or remove the desired power save block. 26 // Does the actual work to apply or remove the desired power save block.
26 void ApplyBlock(); 27 void ApplyBlock();
27 void RemoveBlock(); 28 void RemoveBlock();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 const base::WeakPtr<ui::ViewAndroid>& view_android) { 93 const base::WeakPtr<ui::ViewAndroid>& view_android) {
93 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); 94 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
94 if (!view_android) 95 if (!view_android)
95 return; 96 return;
96 97
97 delegate_ = new Delegate(view_android, ui_task_runner_); 98 delegate_ = new Delegate(view_android, ui_task_runner_);
98 delegate_->ApplyBlock(); 99 delegate_->ApplyBlock();
99 } 100 }
100 101
101 } // namespace device 102 } // namespace device
OLDNEW
« no previous file with comments | « device/geolocation/location_api_adapter_android.cc ('k') | device/usb/usb_device_handle_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698