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 "android_webview/browser/aw_browser_main_parts.h" | 5 #include "android_webview/browser/aw_browser_main_parts.h" |
6 | 6 |
7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
8 #include "android_webview/browser/aw_result_codes.h" | 8 #include "android_webview/browser/aw_result_codes.h" |
9 #include "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
10 #include "base/android/memory_pressure_listener_android.h" | 10 #include "base/android/memory_pressure_listener_android.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "content/public/browser/render_process_host.h" | 13 #include "content/public/browser/render_process_host.h" |
14 #include "content/public/common/content_client.h" | 14 #include "content/public/common/content_client.h" |
15 #include "content/public/common/result_codes.h" | 15 #include "content/public/common/result_codes.h" |
16 #include "net/android/network_change_notifier_factory_android.h" | 16 #include "net/android/network_change_notifier_factory_android.h" |
17 #include "net/base/network_change_notifier.h" | 17 #include "net/base/network_change_notifier.h" |
18 #include "net/http/http_stream_factory.h" | |
18 #include "ui/base/l10n/l10n_util_android.h" | 19 #include "ui/base/l10n/l10n_util_android.h" |
19 #include "ui/base/layout.h" | 20 #include "ui/base/layout.h" |
20 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
21 #include "ui/base/ui_base_paths.h" | 22 #include "ui/base/ui_base_paths.h" |
22 | 23 |
23 namespace android_webview { | 24 namespace android_webview { |
24 | 25 |
25 AwBrowserMainParts::AwBrowserMainParts(AwBrowserContext* browser_context) | 26 AwBrowserMainParts::AwBrowserMainParts(AwBrowserContext* browser_context) |
26 : browser_context_(browser_context) { | 27 : browser_context_(browser_context) { |
27 } | 28 } |
(...skipping 24 matching lines...) Expand all Loading... | |
52 ui::SCALE_FACTOR_NONE); | 53 ui::SCALE_FACTOR_NONE); |
53 | 54 |
54 base::android::MemoryPressureListenerAndroid::RegisterSystemCallback( | 55 base::android::MemoryPressureListenerAndroid::RegisterSystemCallback( |
55 base::android::AttachCurrentThread()); | 56 base::android::AttachCurrentThread()); |
56 | 57 |
57 return content::RESULT_CODE_NORMAL_EXIT; | 58 return content::RESULT_CODE_NORMAL_EXIT; |
58 } | 59 } |
59 | 60 |
60 void AwBrowserMainParts::PreMainMessageLoopRun() { | 61 void AwBrowserMainParts::PreMainMessageLoopRun() { |
61 browser_context_->PreMainMessageLoopRun(); | 62 browser_context_->PreMainMessageLoopRun(); |
63 // TODO(sgurun) remove once crbug.com/329681 is fixed. | |
64 net::HttpStreamFactory::EnableNpnSpdy31(); | |
boliu
2013/12/19 00:46:51
Can this live somewhere in aw_url_request_context_
sgurun-gerrit only
2013/12/19 01:54:14
Done.
| |
62 } | 65 } |
63 | 66 |
64 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { | 67 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { |
65 // Android WebView does not use default MessageLoop. It has its own | 68 // Android WebView does not use default MessageLoop. It has its own |
66 // Android specific MessageLoop. | 69 // Android specific MessageLoop. |
67 return true; | 70 return true; |
68 } | 71 } |
69 | 72 |
70 } // namespace android_webview | 73 } // namespace android_webview |
OLD | NEW |