OLD | NEW |
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 "content/browser/power_save_blocker_android.h" | 5 #include "content/browser/power_save_blocker_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_helper.h" | 8 #include "base/android/jni_helper.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "content/browser/power_save_blocker_impl.h" | 10 #include "content/browser/power_save_blocker_impl.h" |
11 #include "content/public/browser/android/content_view_core.h" | 11 #include "content/public/browser/android/content_view_core.h" |
12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
13 #include "jni/PowerSaveBlocker_jni.h" | 13 #include "jni/PowerSaveBlocker_jni.h" |
14 #include "ui/android/view_android.h" | 14 #include "ui/base/android/view_android.h" |
15 | 15 |
16 using base::android::AttachCurrentThread; | 16 using base::android::AttachCurrentThread; |
17 using base::android::ScopedJavaLocalRef; | 17 using base::android::ScopedJavaLocalRef; |
18 using gfx::NativeView; | 18 using gfx::NativeView; |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
22 class PowerSaveBlockerImpl::Delegate | 22 class PowerSaveBlockerImpl::Delegate |
23 : public base::RefCountedThreadSafe<PowerSaveBlockerImpl::Delegate> { | 23 : public base::RefCountedThreadSafe<PowerSaveBlockerImpl::Delegate> { |
24 public: | 24 public: |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 BrowserThread::PostTask( | 78 BrowserThread::PostTask( |
79 BrowserThread::UI, FROM_HERE, | 79 BrowserThread::UI, FROM_HERE, |
80 base::Bind(&Delegate::ApplyBlock, delegate_)); | 80 base::Bind(&Delegate::ApplyBlock, delegate_)); |
81 } | 81 } |
82 | 82 |
83 bool RegisterPowerSaveBlocker(JNIEnv* env) { | 83 bool RegisterPowerSaveBlocker(JNIEnv* env) { |
84 return RegisterNativesImpl(env); | 84 return RegisterNativesImpl(env); |
85 } | 85 } |
86 | 86 |
87 } // namespace content | 87 } // namespace content |
OLD | NEW |