| Index: ui/views_content_client/views_content_client_main_parts_mac.mm
|
| diff --git a/ui/views_content_client/views_content_client_main_parts_mac.mm b/ui/views_content_client/views_content_client_main_parts_mac.mm
|
| index 2c86c375140e0e02a1234b71dcdf3af6ba5da6c4..40c307fa131c2ff1ba0a334f63feff8bbcdb6be6 100644
|
| --- a/ui/views_content_client/views_content_client_main_parts_mac.mm
|
| +++ b/ui/views_content_client/views_content_client_main_parts_mac.mm
|
| @@ -7,8 +7,10 @@
|
| #include "base/files/file_path.h"
|
| #include "base/mac/scoped_nsobject.h"
|
| #include "base/path_service.h"
|
| +#include "content/public/browser/context_factory.h"
|
| #include "content/public/common/content_paths.h"
|
| #include "content/shell/browser/shell_browser_context.h"
|
| +#include "ui/views/test/desktop_test_views_delegate.h"
|
| #include "ui/views_content_client/views_content_client.h"
|
| #include "ui/views_content_client/views_content_client_main_parts.h"
|
|
|
| @@ -40,10 +42,18 @@ class ViewsContentClientMainPartsMac : public ViewsContentClientMainParts {
|
|
|
| private:
|
| base::scoped_nsobject<ViewsContentClientAppController> app_controller_;
|
| + scoped_ptr<views::ViewsDelegate> composited_views_delegate_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ViewsContentClientMainPartsMac);
|
| };
|
|
|
| +class CompositedTestViewsDelegate : public views::DesktopTestViewsDelegate {
|
| + public:
|
| + virtual ui::ContextFactory* GetContextFactory() OVERRIDE {
|
| + return content::GetContextFactory();
|
| + }
|
| +};
|
| +
|
| ViewsContentClientMainPartsMac::ViewsContentClientMainPartsMac(
|
| const content::MainFunctionParams& content_params,
|
| ViewsContentClient* views_content_client)
|
| @@ -59,6 +69,14 @@ ViewsContentClientMainPartsMac::ViewsContentClientMainPartsMac(
|
| void ViewsContentClientMainPartsMac::PreMainMessageLoopRun() {
|
| ViewsContentClientMainParts::PreMainMessageLoopRun();
|
|
|
| + views_delegate_.reset(); // FIXME
|
| +
|
| + // If run with --enable-delegated-renderer, the GPU channel factory and image
|
| + // transport factory for communicating with the GPU process should already be
|
| + // initialized. This is the default on Mac as of r281692. Otherwise, this file
|
| + // needs a content/browser dependency and some initialization steps here.
|
| + composited_views_delegate_.reset(new CompositedTestViewsDelegate);
|
| +
|
| // On Mac, the task must be deferred to applicationDidFinishLaunching. If not,
|
| // the widget can activate, but (even if configured) the mainMenu won't be
|
| // ready to switch over in the OSX UI, so it will look strange.
|
|
|