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

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

Issue 159173002: Refactor ActivityStatus to not store current activity (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Comments Created 6 years, 10 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 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 #ifndef UI_BASE_ANDROID_WINDOW_ANDROID_H_ 5 #ifndef UI_BASE_ANDROID_WINDOW_ANDROID_H_
6 #define UI_BASE_ANDROID_WINDOW_ANDROID_H_ 6 #define UI_BASE_ANDROID_WINDOW_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <vector> 9 #include <vector>
10 #include "base/android/jni_helper.h" 10 #include "base/android/jni_helper.h"
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "ui/base/ui_base_export.h" 13 #include "ui/base/ui_base_export.h"
14 #include "ui/gfx/vector2d_f.h" 14 #include "ui/gfx/vector2d_f.h"
15 15
16 namespace ui { 16 namespace ui {
17 17
18 class WindowAndroidObserver; 18 class WindowAndroidObserver;
19 19
20 // Android implementation of the activity window. 20 // Android implementation of the activity window.
21 class UI_BASE_EXPORT WindowAndroid { 21 class UI_BASE_EXPORT WindowAndroid {
22 public: 22 public:
23 WindowAndroid(JNIEnv* env, jobject obj); 23 WindowAndroid(JNIEnv* env, jobject obj);
24 24
25 void Destroy(JNIEnv* env, jobject obj); 25 void Destroy(JNIEnv* env, jobject obj);
26 26
27 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); 27 base::android::ScopedJavaLocalRef<jobject> GetJavaObject() const;
Ted C 2014/02/13 04:38:44 Hmm...why is this const? Allowing const to access
David Trainor- moved to gerrit 2014/02/13 05:03:55 Dogh! I passed a const WindowAndroid* through in
David Trainor- moved to gerrit 2014/02/14 19:13:36 Done.
28 28
29 static bool RegisterWindowAndroid(JNIEnv* env); 29 static bool RegisterWindowAndroid(JNIEnv* env);
30 30
31 // The content offset is used to translate snapshots to the correct part of 31 // The content offset is used to translate snapshots to the correct part of
32 // the window. 32 // the window.
33 void set_content_offset(const gfx::Vector2dF& content_offset) { 33 void set_content_offset(const gfx::Vector2dF& content_offset) {
34 content_offset_ = content_offset; 34 content_offset_ = content_offset;
35 } 35 }
36 36
37 bool GrabSnapshot(int content_x, int content_y, int width, int height, 37 bool GrabSnapshot(int content_x, int content_y, int width, int height,
(...skipping 15 matching lines...) Expand all
53 gfx::Vector2dF content_offset_; 53 gfx::Vector2dF content_offset_;
54 54
55 ObserverList<WindowAndroidObserver> observer_list_; 55 ObserverList<WindowAndroidObserver> observer_list_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); 57 DISALLOW_COPY_AND_ASSIGN(WindowAndroid);
58 }; 58 };
59 59
60 } // namespace ui 60 } // namespace ui
61 61
62 #endif // UI_BASE_ANDROID_WINDOW_ANDROID_H_ 62 #endif // UI_BASE_ANDROID_WINDOW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698