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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/public/browser/browser_main_parts.h" | 10 #include "content/public/browser/browser_main_parts.h" |
11 | 11 |
| 12 namespace base { |
12 class MessageLoop; | 13 class MessageLoop; |
| 14 } |
13 | 15 |
14 namespace android_webview { | 16 namespace android_webview { |
15 | 17 |
16 // TODO(joth): Remove this method when when http://crbug.com/161864 is closed. | 18 // TODO(joth): Remove this method when when http://crbug.com/161864 is closed. |
17 bool UseCompositorDirectDraw(); | 19 bool UseCompositorDirectDraw(); |
18 | 20 |
19 class AwBrowserContext; | 21 class AwBrowserContext; |
20 class AwDevToolsDelegate; | 22 class AwDevToolsDelegate; |
21 | 23 |
22 class AwBrowserMainParts : public content::BrowserMainParts { | 24 class AwBrowserMainParts : public content::BrowserMainParts { |
23 public: | 25 public: |
24 explicit AwBrowserMainParts(AwBrowserContext* browser_context); | 26 explicit AwBrowserMainParts(AwBrowserContext* browser_context); |
25 virtual ~AwBrowserMainParts(); | 27 virtual ~AwBrowserMainParts(); |
26 | 28 |
27 // Overriding methods from content::BrowserMainParts. | 29 // Overriding methods from content::BrowserMainParts. |
28 virtual void PreEarlyInitialization() OVERRIDE; | 30 virtual void PreEarlyInitialization() OVERRIDE; |
29 virtual int PreCreateThreads() OVERRIDE; | 31 virtual int PreCreateThreads() OVERRIDE; |
30 virtual void PreMainMessageLoopRun() OVERRIDE; | 32 virtual void PreMainMessageLoopRun() OVERRIDE; |
31 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; | 33 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
32 virtual void PostMainMessageLoopRun() OVERRIDE; | 34 virtual void PostMainMessageLoopRun() OVERRIDE; |
33 | 35 |
34 private: | 36 private: |
35 // Android specific UI MessageLoop. | 37 // Android specific UI MessageLoop. |
36 scoped_ptr<MessageLoop> main_message_loop_; | 38 scoped_ptr<base::MessageLoop> main_message_loop_; |
37 | 39 |
38 AwBrowserContext* browser_context_; // weak | 40 AwBrowserContext* browser_context_; // weak |
39 AwDevToolsDelegate* devtools_delegate_; | 41 AwDevToolsDelegate* devtools_delegate_; |
40 | 42 |
41 DISALLOW_COPY_AND_ASSIGN(AwBrowserMainParts); | 43 DISALLOW_COPY_AND_ASSIGN(AwBrowserMainParts); |
42 }; | 44 }; |
43 | 45 |
44 } // namespace android_webview | 46 } // namespace android_webview |
45 | 47 |
46 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_ | 48 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_ |
OLD | NEW |