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