OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shell/browser/shell.h" | 5 #include "content/shell/browser/shell.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 | 8 |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 Java_Shell_setIsLoading(env, java_object_.obj(), loading); | 43 Java_Shell_setIsLoading(env, java_object_.obj(), loading); |
44 } | 44 } |
45 | 45 |
46 void Shell::PlatformCreateWindow(int width, int height) { | 46 void Shell::PlatformCreateWindow(int width, int height) { |
47 java_object_.Reset(AttachCurrentThread(), CreateShellView(this)); | 47 java_object_.Reset(AttachCurrentThread(), CreateShellView(this)); |
48 } | 48 } |
49 | 49 |
50 void Shell::PlatformSetContents() { | 50 void Shell::PlatformSetContents() { |
51 JNIEnv* env = AttachCurrentThread(); | 51 JNIEnv* env = AttachCurrentThread(); |
52 Java_Shell_initFromNativeTabContents( | 52 Java_Shell_initFromNativeTabContents( |
53 env, java_object_.obj(), reinterpret_cast<jint>(web_contents())); | 53 env, java_object_.obj(), reinterpret_cast<intptr_t>(web_contents())); |
54 } | 54 } |
55 | 55 |
56 void Shell::PlatformResizeSubViews() { | 56 void Shell::PlatformResizeSubViews() { |
57 // Not needed; subviews are bound. | 57 // Not needed; subviews are bound. |
58 } | 58 } |
59 | 59 |
60 void Shell::PlatformSetTitle(const string16& title) { | 60 void Shell::PlatformSetTitle(const string16& title) { |
61 NOTIMPLEMENTED(); | 61 NOTIMPLEMENTED(); |
62 } | 62 } |
63 | 63 |
(...skipping 20 matching lines...) Expand all Loading... |
84 java_object_.Reset(); | 84 java_object_.Reset(); |
85 delete this; | 85 delete this; |
86 } | 86 } |
87 | 87 |
88 // static | 88 // static |
89 bool Shell::Register(JNIEnv* env) { | 89 bool Shell::Register(JNIEnv* env) { |
90 return RegisterNativesImpl(env); | 90 return RegisterNativesImpl(env); |
91 } | 91 } |
92 | 92 |
93 } // namespace content | 93 } // namespace content |
OLD | NEW |