mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Mac: Add Views API support (see issue #1749)
The Chrome browser can now be hosted in a Views-based application on Mac (see issue #2969). To launch a fully-featured Chrome window using cefsimple: $ open cefsimple.app --args --enable-chrome-runtime To launch a minimally-styled Views-hosted window using cefsimple: $ open cefsimple.app --args --use-views [--enable-chrome-runtime] To launch a fully-styled Views-hosted window using cefclient: $ open cefclient.app --args --use-views [--enable-chrome-runtime] Known issues: - Some Views unit tests are currently failing on Mac.
This commit is contained in:
@@ -85,15 +85,10 @@ void SimpleApp::OnContextInitialized() {
|
||||
CefRefPtr<CefCommandLine> command_line =
|
||||
CefCommandLine::GetGlobalCommandLine();
|
||||
|
||||
#if defined(OS_WIN) || defined(OS_LINUX)
|
||||
// Create the browser using the Views framework if "--use-views" is specified
|
||||
// via the command-line. Otherwise, create the browser using the native
|
||||
// platform framework. The Views framework is currently only supported on
|
||||
// Windows and Linux.
|
||||
// platform framework.
|
||||
const bool use_views = command_line->HasSwitch("use-views");
|
||||
#else
|
||||
const bool use_views = false;
|
||||
#endif
|
||||
|
||||
// SimpleHandler implements browser-level callbacks.
|
||||
CefRefPtr<SimpleHandler> handler(new SimpleHandler(use_views));
|
||||
|
Reference in New Issue
Block a user