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

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

Issue 2353063005: Refactor ContentViewClient (1/6) (Closed)
Patch Set: fix tests Created 4 years, 2 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 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/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "chromecast/browser/android/cast_window_manager.h" 9 #include "chromecast/browser/android/cast_window_manager.h"
10 #include "chromecast/browser/cast_content_window.h" 10 #include "chromecast/browser/cast_content_window.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 int32_t line_no, 136 int32_t line_no,
137 const base::string16& source_id) { 137 const base::string16& source_id) {
138 return false; 138 return false;
139 } 139 }
140 140
141 void CastWindowAndroid::ActivateContents(content::WebContents* contents) { 141 void CastWindowAndroid::ActivateContents(content::WebContents* contents) {
142 DCHECK_EQ(contents, web_contents_.get()); 142 DCHECK_EQ(contents, web_contents_.get());
143 contents->GetRenderViewHost()->GetWidget()->Focus(); 143 contents->GetRenderViewHost()->GetWidget()->Focus();
144 } 144 }
145 145
146 base::android::ScopedJavaLocalRef<jobject>
147 CastWindowAndroid::GetContentVideoViewEmbedder() {
148 JNIEnv* env = base::android::AttachCurrentThread();
149 return Java_CastWindowAndroid_getContentVideoViewEmbedder(
150 env, window_java_.obj());
151 }
152
146 void CastWindowAndroid::RenderProcessGone(base::TerminationStatus status) { 153 void CastWindowAndroid::RenderProcessGone(base::TerminationStatus status) {
147 LOG(ERROR) << "Render process gone: status=" << status; 154 LOG(ERROR) << "Render process gone: status=" << status;
148 Destroy(); 155 Destroy();
149 } 156 }
150 157
151 } // namespace shell 158 } // namespace shell
152 } // namespace chromecast 159 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698