OLD | NEW |
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_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "content/browser/android/content_view_core_impl.h" | 10 #include "content/browser/android/content_view_core_impl.h" |
11 #include "content/browser/media/android/browser_media_player_manager.h" | 11 #include "content/browser/media/android/browser_media_player_manager.h" |
12 #include "content/public/browser/user_metrics.h" | |
13 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
14 #include "jni/ContentVideoView_jni.h" | 13 #include "jni/ContentVideoView_jni.h" |
15 | 14 |
16 using base::android::AttachCurrentThread; | 15 using base::android::AttachCurrentThread; |
17 using base::android::CheckException; | 16 using base::android::CheckException; |
18 using base::android::JavaParamRef; | 17 using base::android::JavaParamRef; |
19 using base::android::JavaRef; | 18 using base::android::JavaRef; |
20 using base::android::ScopedJavaGlobalRef; | 19 using base::android::ScopedJavaGlobalRef; |
21 using base::android::ScopedJavaLocalRef; | 20 using base::android::ScopedJavaLocalRef; |
22 using base::UserMetricsAction; | |
23 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 |
29 // singleton instance. | 26 // singleton instance. |
30 ContentVideoView* g_content_video_view = NULL; | 27 ContentVideoView* g_content_video_view = NULL; |
31 | 28 |
32 } // namespace | 29 } // namespace |
33 | 30 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 return JavaObjectWeakGlobalRef(env, nullptr); | 171 return JavaObjectWeakGlobalRef(env, nullptr); |
175 | 172 |
176 return JavaObjectWeakGlobalRef( | 173 return JavaObjectWeakGlobalRef( |
177 env, Java_ContentVideoView_createContentVideoView( | 174 env, Java_ContentVideoView_createContentVideoView( |
178 env, j_content_view_core, j_content_video_view_embedder, | 175 env, j_content_view_core, j_content_video_view_embedder, |
179 reinterpret_cast<intptr_t>(this), | 176 reinterpret_cast<intptr_t>(this), |
180 video_natural_size.width(), video_natural_size.height()) | 177 video_natural_size.width(), video_natural_size.height()) |
181 .obj()); | 178 .obj()); |
182 } | 179 } |
183 } // namespace content | 180 } // namespace content |
OLD | NEW |