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