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

Side by Side Diff: mojo/services/native_viewport/native_viewport_android.cc

Issue 220813002: Fix for Android x64. Address passed using jint. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « mojo/services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "mojo/services/native_viewport/native_viewport_android.h" 5 #include "mojo/services/native_viewport/native_viewport_android.h"
6 6
7 #include <android/input.h> 7 #include <android/input.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 return true; 92 return true;
93 } 93 }
94 94
95 //////////////////////////////////////////////////////////////////////////////// 95 ////////////////////////////////////////////////////////////////////////////////
96 // NativeViewportAndroid, NativeViewport implementation: 96 // NativeViewportAndroid, NativeViewport implementation:
97 97
98 void NativeViewportAndroid::Init(const gfx::Rect& bounds) { 98 void NativeViewportAndroid::Init(const gfx::Rect& bounds) {
99 JNIEnv* env = base::android::AttachCurrentThread(); 99 JNIEnv* env = base::android::AttachCurrentThread();
100 Java_NativeViewportAndroid_createForActivity(env, context_->activity(), 100 Java_NativeViewportAndroid_createForActivity(env, context_->activity(),
101 reinterpret_cast<jint>(this)); 101 reinterpret_cast<jlong>(this));
102 } 102 }
103 103
104 void NativeViewportAndroid::Show() { 104 void NativeViewportAndroid::Show() {
105 // Nothing to do. View is created visible. 105 // Nothing to do. View is created visible.
106 } 106 }
107 107
108 void NativeViewportAndroid::Hide() { 108 void NativeViewportAndroid::Hide() {
109 // Nothing to do. View is always visible. 109 // Nothing to do. View is always visible.
110 } 110 }
111 111
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // static 146 // static
147 scoped_ptr<NativeViewport> NativeViewport::Create( 147 scoped_ptr<NativeViewport> NativeViewport::Create(
148 shell::Context* context, 148 shell::Context* context,
149 NativeViewportDelegate* delegate) { 149 NativeViewportDelegate* delegate) {
150 return scoped_ptr<NativeViewport>( 150 return scoped_ptr<NativeViewport>(
151 new NativeViewportAndroid(context, delegate)).Pass(); 151 new NativeViewportAndroid(context, delegate)).Pass();
152 } 152 }
153 153
154 } // namespace services 154 } // namespace services
155 } // namespace mojo 155 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698