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

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

Issue 2199973003: Android JNI gen: Don't emit code for empty RegisterNatives() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@jnireg1
Patch Set: Android JNI gen: Don't emit code for empty RegisterNatives() Created 4 years, 4 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/cast_window_android.h ('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/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 13 matching lines...) Expand all
24 24
25 namespace { 25 namespace {
26 26
27 // The time (in milliseconds) we wait for after a page is closed (i.e. 27 // The time (in milliseconds) we wait for after a page is closed (i.e.
28 // after an app is stopped) before we delete the corresponding WebContents. 28 // after an app is stopped) before we delete the corresponding WebContents.
29 const int kWebContentsDestructionDelayInMs = 50; 29 const int kWebContentsDestructionDelayInMs = 50;
30 30
31 } // namespace 31 } // namespace
32 32
33 // static 33 // static
34 bool CastWindowAndroid::RegisterJni(JNIEnv* env) {
35 return RegisterNativesImpl(env);
36 }
37
38 // static
39 CastWindowAndroid* CastWindowAndroid::CreateNewWindow( 34 CastWindowAndroid* CastWindowAndroid::CreateNewWindow(
40 content::BrowserContext* browser_context, 35 content::BrowserContext* browser_context,
41 const GURL& url) { 36 const GURL& url) {
42 CastWindowAndroid* window_android = new CastWindowAndroid(browser_context); 37 CastWindowAndroid* window_android = new CastWindowAndroid(browser_context);
43 window_android->Initialize(); 38 window_android->Initialize();
44 39
45 if (!url.is_empty()) 40 if (!url.is_empty())
46 window_android->LoadURL(url); 41 window_android->LoadURL(url);
47 42
48 content::RenderWidgetHostView* rwhv = 43 content::RenderWidgetHostView* rwhv =
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 contents->GetRenderViewHost()->GetWidget()->Focus(); 144 contents->GetRenderViewHost()->GetWidget()->Focus();
150 } 145 }
151 146
152 void CastWindowAndroid::RenderProcessGone(base::TerminationStatus status) { 147 void CastWindowAndroid::RenderProcessGone(base::TerminationStatus status) {
153 LOG(ERROR) << "Render process gone: status=" << status; 148 LOG(ERROR) << "Render process gone: status=" << status;
154 Destroy(); 149 Destroy();
155 } 150 }
156 151
157 } // namespace shell 152 } // namespace shell
158 } // namespace chromecast 153 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/android/cast_window_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698