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/shell/shell.h" | 5 #include "content/shell/shell.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 | 8 |
9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
11 #include "base/command_line.h" | |
11 #include "base/logging.h" | 12 #include "base/logging.h" |
12 #include "base/string_piece.h" | 13 #include "base/string_piece.h" |
14 #include "content/public/common/content_switches.h" | |
13 #include "content/shell/android/shell_manager.h" | 15 #include "content/shell/android/shell_manager.h" |
14 #include "jni/Shell_jni.h" | 16 #include "jni/Shell_jni.h" |
15 | 17 |
16 using base::android::AttachCurrentThread; | 18 using base::android::AttachCurrentThread; |
17 using base::android::ConvertUTF8ToJavaString; | 19 using base::android::ConvertUTF8ToJavaString; |
18 | 20 |
19 namespace content { | 21 namespace content { |
20 | 22 |
21 base::StringPiece Shell::PlatformResourceProvider(int key) { | 23 base::StringPiece Shell::PlatformResourceProvider(int key) { |
22 return base::StringPiece(); | 24 return base::StringPiece(); |
23 } | 25 } |
24 | 26 |
25 void Shell::PlatformInitialize() { | 27 void Shell::PlatformInitialize() { |
28 // TODO(sievers): This should just assert the right flags are | |
aelias_OOO_until_Jul13
2012/07/27 19:58:24
These will be added by Yusuf's gesture patch http:
no sievers
2012/07/31 01:28:44
Cool, I turned it into a dcheck() then.
On 2012/0
| |
29 // already set. | |
30 CommandLine* command_line = CommandLine::ForCurrentProcess(); | |
31 command_line->AppendSwitch(switches::kForceCompositingMode); | |
32 command_line->AppendSwitch(switches::kEnableThreadedCompositing); | |
26 } | 33 } |
27 | 34 |
28 void Shell::PlatformCleanUp() { | 35 void Shell::PlatformCleanUp() { |
29 } | 36 } |
30 | 37 |
31 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { | 38 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { |
32 } | 39 } |
33 | 40 |
34 void Shell::PlatformSetAddressBarURL(const GURL& url) { | 41 void Shell::PlatformSetAddressBarURL(const GURL& url) { |
35 JNIEnv* env = AttachCurrentThread(); | 42 JNIEnv* env = AttachCurrentThread(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 // TODO(tedchoc): Implement Close method for android shell | 75 // TODO(tedchoc): Implement Close method for android shell |
69 NOTIMPLEMENTED(); | 76 NOTIMPLEMENTED(); |
70 } | 77 } |
71 | 78 |
72 // static | 79 // static |
73 bool Shell::Register(JNIEnv* env) { | 80 bool Shell::Register(JNIEnv* env) { |
74 return RegisterNativesImpl(env); | 81 return RegisterNativesImpl(env); |
75 } | 82 } |
76 | 83 |
77 } // namespace content | 84 } // namespace content |
OLD | NEW |