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

Side by Side Diff: ui/base/android/window_android.cc

Issue 82553015: Switch the android overscroll glow to use UIResources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor naming changes Created 7 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/base/android/window_android.h" 5 #include "ui/base/android/window_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_helper.h" 9 #include "base/android/jni_helper.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 content_x + content_offset_.x(), 44 content_x + content_offset_.x(),
45 content_y + content_offset_.y(), 45 content_y + content_offset_.y(),
46 width, height); 46 width, height);
47 if (result.is_null()) 47 if (result.is_null())
48 return false; 48 return false;
49 base::android::JavaByteArrayToByteVector( 49 base::android::JavaByteArrayToByteVector(
50 env, result.obj(), png_representation); 50 env, result.obj(), png_representation);
51 return true; 51 return true;
52 } 52 }
53 53
54 void WindowAndroid::OnCompositingDidCommit() { 54 void WindowAndroid::OnCompositingDidCommit(content::Compositor* compositor) {
55 FOR_EACH_OBSERVER(WindowAndroidObserver, 55 FOR_EACH_OBSERVER(WindowAndroidObserver,
56 observer_list_, 56 observer_list_,
57 OnCompositingDidCommit()); 57 OnCompositingDidCommit(compositor));
58 } 58 }
59 59
60 void WindowAndroid::AddObserver(WindowAndroidObserver* observer) { 60 void WindowAndroid::AddObserver(WindowAndroidObserver* observer) {
61 if (!observer_list_.HasObserver(observer)) 61 if (!observer_list_.HasObserver(observer))
62 observer_list_.AddObserver(observer); 62 observer_list_.AddObserver(observer);
63 } 63 }
64 64
65 void WindowAndroid::RemoveObserver(WindowAndroidObserver* observer) { 65 void WindowAndroid::RemoveObserver(WindowAndroidObserver* observer) {
66 observer_list_.RemoveObserver(observer); 66 observer_list_.RemoveObserver(observer);
67 } 67 }
(...skipping 14 matching lines...) Expand all
82 // ---------------------------------------------------------------------------- 82 // ----------------------------------------------------------------------------
83 // Native JNI methods 83 // Native JNI methods
84 // ---------------------------------------------------------------------------- 84 // ----------------------------------------------------------------------------
85 85
86 jlong Init(JNIEnv* env, jobject obj) { 86 jlong Init(JNIEnv* env, jobject obj) {
87 WindowAndroid* window = new WindowAndroid(env, obj); 87 WindowAndroid* window = new WindowAndroid(env, obj);
88 return reinterpret_cast<intptr_t>(window); 88 return reinterpret_cast<intptr_t>(window);
89 } 89 }
90 90
91 } // namespace ui 91 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698