| 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 #ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" |
| 12 #include "content/public/browser/browser_main_parts.h" | 13 #include "content/public/browser/browser_main_parts.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 class MessageLoop; | 16 class MessageLoop; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace android_webview { | 19 namespace android_webview { |
| 19 | 20 |
| 20 class AwBrowserContext; | 21 class AwBrowserContext; |
| 22 class AwBrowserTerminator; |
| 21 class AwContentBrowserClient; | 23 class AwContentBrowserClient; |
| 22 | 24 |
| 23 class AwBrowserMainParts : public content::BrowserMainParts { | 25 class AwBrowserMainParts : public content::BrowserMainParts { |
| 24 public: | 26 public: |
| 25 explicit AwBrowserMainParts(AwContentBrowserClient* browser_client); | 27 explicit AwBrowserMainParts(AwContentBrowserClient* browser_client); |
| 26 ~AwBrowserMainParts() override; | 28 ~AwBrowserMainParts() override; |
| 27 | 29 |
| 28 // Overriding methods from content::BrowserMainParts. | 30 // Overriding methods from content::BrowserMainParts. |
| 29 void PreEarlyInitialization() override; | 31 void PreEarlyInitialization() override; |
| 30 int PreCreateThreads() override; | 32 int PreCreateThreads() override; |
| 31 void PreMainMessageLoopRun() override; | 33 void PreMainMessageLoopRun() override; |
| 32 bool MainMessageLoopRun(int* result_code) override; | 34 bool MainMessageLoopRun(int* result_code) override; |
| 33 | 35 |
| 34 private: | 36 private: |
| 35 // Android specific UI MessageLoop. | 37 // Android specific UI MessageLoop. |
| 36 std::unique_ptr<base::MessageLoop> main_message_loop_; | 38 std::unique_ptr<base::MessageLoop> main_message_loop_; |
| 39 scoped_refptr<AwBrowserTerminator> aw_browser_terminator_; |
| 37 | 40 |
| 38 AwContentBrowserClient* browser_client_; | 41 AwContentBrowserClient* browser_client_; |
| 39 | 42 |
| 40 DISALLOW_COPY_AND_ASSIGN(AwBrowserMainParts); | 43 DISALLOW_COPY_AND_ASSIGN(AwBrowserMainParts); |
| 41 }; | 44 }; |
| 42 | 45 |
| 43 } // namespace android_webview | 46 } // namespace android_webview |
| 44 | 47 |
| 45 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_ | 48 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_ |
| OLD | NEW |