Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / android_webview / browser / aw_browser_main_parts.h
blobb43e53b401479bae99125d024a716daddac61434
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
3 // found in the LICENSE file.
5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_
6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/browser/browser_main_parts.h"
12 namespace base {
13 class MessageLoop;
16 namespace android_webview {
18 // TODO(joth): Remove this method when when http://crbug.com/161864 is closed.
19 bool UseCompositorDirectDraw();
21 class AwBrowserContext;
22 class AwDevToolsDelegate;
24 class AwBrowserMainParts : public content::BrowserMainParts {
25 public:
26 explicit AwBrowserMainParts(AwBrowserContext* browser_context);
27 virtual ~AwBrowserMainParts();
29 // Overriding methods from content::BrowserMainParts.
30 virtual void PreEarlyInitialization() OVERRIDE;
31 virtual int PreCreateThreads() OVERRIDE;
32 virtual void PreMainMessageLoopRun() OVERRIDE;
33 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
34 virtual void PostMainMessageLoopRun() OVERRIDE;
36 private:
37 // Android specific UI MessageLoop.
38 scoped_ptr<base::MessageLoop> main_message_loop_;
40 AwBrowserContext* browser_context_; // weak
41 AwDevToolsDelegate* devtools_delegate_;
43 DISALLOW_COPY_AND_ASSIGN(AwBrowserMainParts);
46 } // namespace android_webview
48 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_