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 "content/public/browser/browser_main_parts.h" | 12 #include "content/public/browser/browser_main_parts.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 class MessageLoop; | 15 class MessageLoop; |
16 } | 16 } |
17 | 17 |
18 namespace android_webview { | 18 namespace android_webview { |
19 | 19 |
20 class AwBrowserContext; | 20 class AwBrowserContext; |
21 class AwContentBrowserClient; | |
21 | 22 |
22 class AwBrowserMainParts : public content::BrowserMainParts { | 23 class AwBrowserMainParts : public content::BrowserMainParts { |
23 public: | 24 public: |
24 explicit AwBrowserMainParts(AwBrowserContext* browser_context); | 25 explicit AwBrowserMainParts(AwContentBrowserClient* browser_client); |
25 ~AwBrowserMainParts() override; | 26 ~AwBrowserMainParts() override; |
26 | 27 |
27 // Overriding methods from content::BrowserMainParts. | 28 // Overriding methods from content::BrowserMainParts. |
28 void PreEarlyInitialization() override; | 29 void PreEarlyInitialization() override; |
29 int PreCreateThreads() override; | 30 int PreCreateThreads() override; |
30 void PreMainMessageLoopRun() override; | 31 void PreMainMessageLoopRun() override; |
31 bool MainMessageLoopRun(int* result_code) override; | 32 bool MainMessageLoopRun(int* result_code) override; |
32 | 33 |
33 private: | 34 private: |
34 // Android specific UI MessageLoop. | 35 // Android specific UI MessageLoop. |
35 std::unique_ptr<base::MessageLoop> main_message_loop_; | 36 std::unique_ptr<base::MessageLoop> main_message_loop_; |
36 | 37 |
37 AwBrowserContext* browser_context_; // weak | 38 AwContentBrowserClient* browser_client_; |
39 AwBrowserContext* browser_context_ = nullptr; | |
boliu
2016/08/02 19:22:54
can be removed?
| |
38 | 40 |
39 DISALLOW_COPY_AND_ASSIGN(AwBrowserMainParts); | 41 DISALLOW_COPY_AND_ASSIGN(AwBrowserMainParts); |
40 }; | 42 }; |
41 | 43 |
42 } // namespace android_webview | 44 } // namespace android_webview |
43 | 45 |
44 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_ | 46 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_ |
OLD | NEW |