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_devtools_delegate.h" |
8 #include "android_webview/browser/aw_result_codes.h" | 9 #include "android_webview/browser/aw_result_codes.h" |
9 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
10 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
11 #include "base/path_service.h" | 12 #include "base/path_service.h" |
12 #include "content/public/browser/android/compositor.h" | 13 #include "content/public/browser/android/compositor.h" |
13 #include "content/public/browser/content_browser_client.h" | 14 #include "content/public/browser/content_browser_client.h" |
14 #include "content/public/browser/render_process_host.h" | 15 #include "content/public/browser/render_process_host.h" |
15 #include "content/public/common/content_client.h" | 16 #include "content/public/common/content_client.h" |
16 #include "content/public/common/result_codes.h" | 17 #include "content/public/common/result_codes.h" |
17 #include "net/android/network_change_notifier_factory_android.h" | 18 #include "net/android/network_change_notifier_factory_android.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 58 |
58 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 59 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
59 pak_path.AppendASCII("webviewchromium.pak"), | 60 pak_path.AppendASCII("webviewchromium.pak"), |
60 ui::SCALE_FACTOR_NONE); | 61 ui::SCALE_FACTOR_NONE); |
61 | 62 |
62 return content::RESULT_CODE_NORMAL_EXIT; | 63 return content::RESULT_CODE_NORMAL_EXIT; |
63 } | 64 } |
64 | 65 |
65 void AwBrowserMainParts::PreMainMessageLoopRun() { | 66 void AwBrowserMainParts::PreMainMessageLoopRun() { |
66 browser_context_->PreMainMessageLoopRun(); | 67 browser_context_->PreMainMessageLoopRun(); |
| 68 devtools_delegate_ = new AwDevToolsDelegate(browser_context_); |
67 } | 69 } |
68 | 70 |
69 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { | 71 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { |
70 // Android WebView does not use default MessageLoop. It has its own | 72 // Android WebView does not use default MessageLoop. It has its own |
71 // Android specific MessageLoop. | 73 // Android specific MessageLoop. |
72 return true; | 74 return true; |
73 } | 75 } |
74 | 76 |
| 77 void AwBrowserMainParts::PostMainMessageLoopRun() { |
| 78 if (devtools_delegate_) |
| 79 devtools_delegate_->Stop(); |
| 80 } |
| 81 |
75 } // namespace android_webview | 82 } // namespace android_webview |
OLD | NEW |