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

Side by Side Diff: chromecast/browser/android/cast_window_android.cc

Issue 879073002: Chromecast Android buildfix: use new ContentViewCore.initialize API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/android/cast_window_android.h" 5 #include "chromecast/browser/android/cast_window_android.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "chromecast/browser/android/cast_window_manager.h" 8 #include "chromecast/browser/android/cast_window_manager.h"
9 #include "content/public/browser/devtools_agent_host.h" 9 #include "content/public/browser/devtools_agent_host.h"
10 #include "content/public/browser/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 JNIEnv* env = base::android::AttachCurrentThread(); 63 JNIEnv* env = base::android::AttachCurrentThread();
64 base::android::ScopedJavaLocalRef<jobject> shell_android( 64 base::android::ScopedJavaLocalRef<jobject> shell_android(
65 CreateCastWindowView(shell)); 65 CreateCastWindowView(shell));
66 66
67 shell->java_object_.Reset(env, shell_android.Release()); 67 shell->java_object_.Reset(env, shell_android.Release());
68 shell->web_contents_.reset(web_contents); 68 shell->web_contents_.reset(web_contents);
69 web_contents->SetDelegate(shell); 69 web_contents->SetDelegate(shell);
70 70
71 Java_CastWindowAndroid_initFromNativeWebContents( 71 Java_CastWindowAndroid_initFromNativeWebContents(
72 env, shell->java_object_.obj(), reinterpret_cast<jint>(web_contents), 72 env, shell->java_object_.obj(), web_contents->GetJavaWebContents().obj(),
73 web_contents->GetRenderProcessHost()->GetID()); 73 web_contents->GetRenderProcessHost()->GetID());
74 74
75 // Enabling hole-punching also requires runtime renderer preference 75 // Enabling hole-punching also requires runtime renderer preference
76 web_contents->GetMutableRendererPrefs()-> 76 web_contents->GetMutableRendererPrefs()->
77 use_video_overlay_for_embedded_encrypted_video = true; 77 use_video_overlay_for_embedded_encrypted_video = true;
78 web_contents->GetRenderViewHost()->SyncRendererPrefs(); 78 web_contents->GetRenderViewHost()->SyncRendererPrefs();
79 79
80 return shell; 80 return shell;
81 } 81 }
82 82
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 contents->GetRenderViewHost()->Blur(); 165 contents->GetRenderViewHost()->Blur();
166 } 166 }
167 167
168 void CastWindowAndroid::RenderProcessGone(base::TerminationStatus status) { 168 void CastWindowAndroid::RenderProcessGone(base::TerminationStatus status) {
169 LOG(ERROR) << "Render process gone: status=" << status; 169 LOG(ERROR) << "Render process gone: status=" << status;
170 Destroy(); 170 Destroy();
171 } 171 }
172 172
173 } // namespace shell 173 } // namespace shell
174 } // namespace chromecast 174 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698