Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: content/public/app/content_main_runner.h

Issue 9375017: Support sharing of ContentMain and BrowserMain code with embedded use cases (try #3). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/app/content_main_delegate.h ('k') | content/public/browser/browser_main_parts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/app/content_main_runner.h
===================================================================
--- content/public/app/content_main_runner.h (revision 0)
+++ content/public/app/content_main_runner.h (revision 0)
@@ -0,0 +1,57 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_APP_CONTENT_MAIN_RUNNER_H_
+#define CONTENT_PUBLIC_APP_CONTENT_MAIN_RUNNER_H_
+#pragma once
+
+#include <string>
+
+#include "build/build_config.h"
+
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
+namespace sandbox {
+struct SandboxInterfaceInfo;
+}
+
+namespace content {
+
+class ContentMainDelegate;
+
+// This class is responsible for content initialization, running and shutdown.
+class ContentMainRunner {
+ public:
+ virtual ~ContentMainRunner() {}
+
+ // Create a new ContentMainRunner object.
+ static ContentMainRunner* Create();
+
+ // Initialize all necessary content state.
+#if defined(OS_WIN)
+ // The |sandbox_info| and |delegate| objects must outlive this class.
+ // |sandbox_info| should be initialized using InitializeSandboxInfo from
+ // content_main_win.h.
+ virtual int Initialize(HINSTANCE instance,
+ sandbox::SandboxInterfaceInfo* sandbox_info,
+ ContentMainDelegate* delegate) = 0;
+#else
+ // The |delegate| object must outlive this class.
+ virtual int Initialize(int argc,
+ const char** argv,
+ ContentMainDelegate* delegate) = 0;
+#endif
+
+ // Perform the default run logic.
+ virtual int Run() = 0;
+
+ // Shut down the content state.
+ virtual void Shutdown() = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_APP_CONTENT_MAIN_RUNNER_H_
Property changes on: content\public\app\content_main_runner.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « content/public/app/content_main_delegate.h ('k') | content/public/browser/browser_main_parts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698