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/app/android/content_main.h" | 5 #include "content/app/android/content_main.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "content/public/app/content_main_delegate.h" | 11 #include "content/public/app/content_main_delegate.h" |
12 #include "content/public/app/content_main_runner.h" | 12 #include "content/public/app/content_main_runner.h" |
13 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
14 #include "jni/ContentMain_jni.h" | 14 #include "jni/ContentMain_jni.h" |
15 #include "webkit/glue/user_agent.h" | |
16 | 15 |
17 using base::LazyInstance; | 16 using base::LazyInstance; |
18 using content::ContentMainRunner; | 17 using content::ContentMainRunner; |
19 using content::ContentMainDelegate; | 18 using content::ContentMainDelegate; |
20 | 19 |
21 namespace { | 20 namespace { |
22 LazyInstance<scoped_ptr<ContentMainRunner> > g_content_runner = | 21 LazyInstance<scoped_ptr<ContentMainRunner> > g_content_runner = |
23 LAZY_INSTANCE_INITIALIZER; | 22 LAZY_INSTANCE_INITIALIZER; |
24 | 23 |
25 LazyInstance<scoped_ptr<ContentMainDelegate> > g_content_main_delegate = | 24 LazyInstance<scoped_ptr<ContentMainDelegate> > g_content_main_delegate = |
(...skipping 30 matching lines...) Expand all Loading... |
56 void SetContentMainDelegate(ContentMainDelegate* delegate) { | 55 void SetContentMainDelegate(ContentMainDelegate* delegate) { |
57 DCHECK(!g_content_main_delegate.Get().get()); | 56 DCHECK(!g_content_main_delegate.Get().get()); |
58 g_content_main_delegate.Get().reset(delegate); | 57 g_content_main_delegate.Get().reset(delegate); |
59 } | 58 } |
60 | 59 |
61 bool RegisterContentMain(JNIEnv* env) { | 60 bool RegisterContentMain(JNIEnv* env) { |
62 return RegisterNativesImpl(env); | 61 return RegisterNativesImpl(env); |
63 } | 62 } |
64 | 63 |
65 } // namespace content | 64 } // namespace content |
OLD | NEW |