aw_main_delegate.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
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_LIB_MAIN_AW_MAIN_DELEGATE_H_ 6#define ANDROID_WEBVIEW_LIB_MAIN_AW_MAIN_DELEGATE_H_ 7 8#include "android_webview/common/aw_content_client.h" 9#include "base/memory/scoped_ptr.h" 10#include "content/public/app/content_main_delegate.h" 11 12namespace content { 13class BrowserMainRunner; 14} 15 16namespace android_webview { 17 18// Android WebView implementation of ContentMainDelegate. 19class AwMainDelegate : public content::ContentMainDelegate { 20 public: 21 AwMainDelegate(); 22 virtual ~AwMainDelegate(); 23 24 private: 25 // content::ContentMainDelegate implementation: 26 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; 27 virtual void PreSandboxStartup() OVERRIDE; 28 virtual void SandboxInitialized(const std::string& process_type) OVERRIDE; 29 virtual int RunProcess( 30 const std::string& process_type, 31 const content::MainFunctionParams& main_function_params) OVERRIDE; 32 virtual void ProcessExiting(const std::string& process_type) OVERRIDE; 33 virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; 34 virtual content::ContentRendererClient* 35 CreateContentRendererClient() OVERRIDE; 36 37 scoped_ptr<content::BrowserMainRunner> browser_runner_; 38 android_webview::AwContentClient content_client_; 39 40 DISALLOW_COPY_AND_ASSIGN(AwMainDelegate); 41}; 42 43} // namespace android_webview 44 45#endif // ANDROID_WEBVIEW_LIB_MAIN_AW_MAIN_DELEGATE_H_ 46