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

Unified Diff: ui/views_content_client/views_content_client_main_parts_mac.mm

Issue 659233002: STASH: Epic Experimental patch for toolkit-views App List on Mac Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Fix a few things. Works@master Created 6 years, 2 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 | « ui/views_content_client/views_content_client_main_parts.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 afeae12bc963e8d060bc7c2ef501f461c45767ca..a1f2d2440548063d0cd8dfbb6f1b6594c1d798c7 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,9 +7,11 @@
#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/browser/plugin_service.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"
@@ -41,10 +43,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)
@@ -64,6 +74,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.
« no previous file with comments | « ui/views_content_client/views_content_client_main_parts.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698