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