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

Side by Side Diff: services/native_viewport/platform_viewport_android.cc

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 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 "services/native_viewport/platform_viewport_android.h" 5 #include "services/native_viewport/platform_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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 //////////////////////////////////////////////////////////////////////////////// 161 ////////////////////////////////////////////////////////////////////////////////
162 // PlatformViewportAndroid, PlatformViewport implementation: 162 // PlatformViewportAndroid, PlatformViewport implementation:
163 163
164 void PlatformViewportAndroid::Init(const gfx::Rect& bounds) { 164 void PlatformViewportAndroid::Init(const gfx::Rect& bounds) {
165 JNIEnv* env = base::android::AttachCurrentThread(); 165 JNIEnv* env = base::android::AttachCurrentThread();
166 Java_PlatformViewportAndroid_createRequest(env, 166 Java_PlatformViewportAndroid_createRequest(env,
167 reinterpret_cast<intptr_t>(this)); 167 reinterpret_cast<intptr_t>(this));
168 168
169 application_->ConnectToService("mojo:native_viewport_support", 169 application_->ConnectToServiceDeprecated("mojo:native_viewport_support",
170 &support_service_); 170 &support_service_);
171 support_service_->CreateNewNativeWindow( 171 support_service_->CreateNewNativeWindow(
172 base::Bind(&PlatformViewportAndroid::Close, weak_factory_.GetWeakPtr())); 172 base::Bind(&PlatformViewportAndroid::Close, weak_factory_.GetWeakPtr()));
173 } 173 }
174 174
175 void PlatformViewportAndroid::Show() { 175 void PlatformViewportAndroid::Show() {
176 // Nothing to do. View is created visible. 176 // Nothing to do. View is created visible.
177 } 177 }
178 178
179 void PlatformViewportAndroid::Hide() { 179 void PlatformViewportAndroid::Hide() {
180 // Nothing to do. View is always visible. 180 // Nothing to do. View is always visible.
(...skipping 28 matching lines...) Expand all
209 // static 209 // static
210 scoped_ptr<PlatformViewport> PlatformViewport::Create( 210 scoped_ptr<PlatformViewport> PlatformViewport::Create(
211 mojo::ApplicationImpl* application_, 211 mojo::ApplicationImpl* application_,
212 Delegate* delegate) { 212 Delegate* delegate) {
213 return scoped_ptr<PlatformViewport>( 213 return scoped_ptr<PlatformViewport>(
214 new PlatformViewportAndroid(application_, delegate)) 214 new PlatformViewportAndroid(application_, delegate))
215 .Pass(); 215 .Pass();
216 } 216 }
217 217
218 } // namespace native_viewport 218 } // namespace native_viewport
OLDNEW
« no previous file with comments | « services/native_support/process_test_base.cc ('k') | services/notifications/apptests/notifications_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698