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

Side by Side Diff: content/browser/android/content_video_view.cc

Issue 1649483002: Revert of Aura on Android: content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@auraclank_upstream_select_file
Patch Set: Merging android_non_aura_browser_sources into android_browser_sources rather than private_browser_s… Created 4 years, 11 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
« no previous file with comments | « content/browser/android/content_startup_flags.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/android/content_video_view.h" 5 #include "content/browser/android/content_video_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "content/browser/android/content_view_core_impl.h"
10 #include "content/browser/media/android/browser_media_player_manager.h" 11 #include "content/browser/media/android/browser_media_player_manager.h"
11 #include "content/public/browser/user_metrics.h" 12 #include "content/public/browser/user_metrics.h"
12 #include "content/public/common/content_switches.h" 13 #include "content/public/common/content_switches.h"
13 #include "jni/ContentVideoView_jni.h" 14 #include "jni/ContentVideoView_jni.h"
14 15
15 #if !defined(USE_AURA)
16 #include "content/browser/android/content_view_core_impl.h"
17 #endif
18
19 using base::android::AttachCurrentThread; 16 using base::android::AttachCurrentThread;
20 using base::android::CheckException; 17 using base::android::CheckException;
21 using base::android::ScopedJavaGlobalRef; 18 using base::android::ScopedJavaGlobalRef;
22 using base::UserMetricsAction; 19 using base::UserMetricsAction;
23 using content::RecordAction; 20 using content::RecordAction;
24 21
25 namespace content { 22 namespace content {
26 23
27 namespace { 24 namespace {
28 // There can only be one content video view at a time, this holds onto that 25 // There can only be one content video view at a time, this holds onto that
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 "MobileFullscreenVideo.LandscapeDuration", 152 "MobileFullscreenVideo.LandscapeDuration",
156 playback_duration_in_milliseconds_before_orientation_change); 153 playback_duration_in_milliseconds_before_orientation_change);
157 UMA_HISTOGRAM_COUNTS( 154 UMA_HISTOGRAM_COUNTS(
158 "MobileFullscreenVideo.LandscapeRotation", orientation_changed); 155 "MobileFullscreenVideo.LandscapeRotation", orientation_changed);
159 } 156 }
160 } 157 }
161 158
162 JavaObjectWeakGlobalRef ContentVideoView::CreateJavaObject( 159 JavaObjectWeakGlobalRef ContentVideoView::CreateJavaObject(
163 ContentViewCore* content_view_core) { 160 ContentViewCore* content_view_core) {
164 JNIEnv* env = AttachCurrentThread(); 161 JNIEnv* env = AttachCurrentThread();
165 base::android::ScopedJavaLocalRef<jobject> j_content_view_core; 162 base::android::ScopedJavaLocalRef<jobject> j_content_view_core =
166 163 content_view_core->GetJavaObject();
167 #if !defined(USE_AURA)
168 j_content_view_core = content_view_core->GetJavaObject();
169 #endif
170
171 if (j_content_view_core.is_null()) 164 if (j_content_view_core.is_null())
172 return JavaObjectWeakGlobalRef(env, nullptr); 165 return JavaObjectWeakGlobalRef(env, nullptr);
173 166
174 return JavaObjectWeakGlobalRef( 167 return JavaObjectWeakGlobalRef(
175 env, 168 env,
176 Java_ContentVideoView_createContentVideoView( 169 Java_ContentVideoView_createContentVideoView(
177 env, 170 env,
178 j_content_view_core.obj(), 171 j_content_view_core.obj(),
179 reinterpret_cast<intptr_t>(this)).obj()); 172 reinterpret_cast<intptr_t>(this)).obj());
180 } 173 }
181 } // namespace content 174 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_startup_flags.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698