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

Side by Side Diff: android_webview/browser/aw_browser_main_parts.cc

Issue 1099243004: [DevTools] Migrate android to devtools_discovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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 | « no previous file | android_webview/browser/aw_dev_tools_discovery_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_dev_tools_discovery_provider.h" 8 #include "android_webview/browser/aw_dev_tools_discovery_provider.h"
9 #include "android_webview/browser/aw_result_codes.h" 9 #include "android_webview/browser/aw_result_codes.h"
10 #include "android_webview/native/public/aw_assets.h" 10 #include "android_webview/native/public/aw_assets.h"
11 #include "base/android/build_info.h" 11 #include "base/android/build_info.h"
12 #include "base/android/locale_utils.h" 12 #include "base/android/locale_utils.h"
13 #include "base/android/memory_pressure_listener_android.h" 13 #include "base/android/memory_pressure_listener_android.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
16 #include "components/devtools_discovery/devtools_discovery_manager.h"
17 #include "content/public/browser/render_process_host.h" 16 #include "content/public/browser/render_process_host.h"
18 #include "content/public/common/content_client.h" 17 #include "content/public/common/content_client.h"
19 #include "content/public/common/content_switches.h" 18 #include "content/public/common/content_switches.h"
20 #include "content/public/common/result_codes.h" 19 #include "content/public/common/result_codes.h"
21 #include "content/public/common/url_utils.h" 20 #include "content/public/common/url_utils.h"
22 #include "net/android/network_change_notifier_factory_android.h" 21 #include "net/android/network_change_notifier_factory_android.h"
23 #include "net/base/network_change_notifier.h" 22 #include "net/base/network_change_notifier.h"
24 #include "ui/base/l10n/l10n_util.h" 23 #include "ui/base/l10n/l10n_util.h"
25 #include "ui/base/layout.h" 24 #include "ui/base/layout.h"
26 #include "ui/base/resource/resource_bundle.h" 25 #include "ui/base/resource/resource_bundle.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 87
89 base::android::MemoryPressureListenerAndroid::RegisterSystemCallback( 88 base::android::MemoryPressureListenerAndroid::RegisterSystemCallback(
90 base::android::AttachCurrentThread()); 89 base::android::AttachCurrentThread());
91 90
92 return content::RESULT_CODE_NORMAL_EXIT; 91 return content::RESULT_CODE_NORMAL_EXIT;
93 } 92 }
94 93
95 void AwBrowserMainParts::PreMainMessageLoopRun() { 94 void AwBrowserMainParts::PreMainMessageLoopRun() {
96 browser_context_->PreMainMessageLoopRun(); 95 browser_context_->PreMainMessageLoopRun();
97 96
98 devtools_discovery::DevToolsDiscoveryManager* discovery_manager = 97 AwDevToolsDiscoveryProvider::Install();
99 devtools_discovery::DevToolsDiscoveryManager::GetInstance();
100 discovery_manager->AddProvider(make_scoped_ptr(
101 new AwDevToolsDiscoveryProvider()));
102 98
103 // This is needed for WebView Classic backwards compatibility 99 // This is needed for WebView Classic backwards compatibility
104 // See crbug.com/298495 100 // See crbug.com/298495
105 content::SetMaxURLChars(20 * 1024 * 1024); 101 content::SetMaxURLChars(20 * 1024 * 1024);
106 } 102 }
107 103
108 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { 104 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) {
109 // Android WebView does not use default MessageLoop. It has its own 105 // Android WebView does not use default MessageLoop. It has its own
110 // Android specific MessageLoop. 106 // Android specific MessageLoop.
111 return true; 107 return true;
112 } 108 }
113 109
114 } // namespace android_webview 110 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/aw_dev_tools_discovery_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698