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

Unified Diff: ui/views_content_client/views_content_client_main_parts_mac.mm

Issue 283053002: Add compositing, layers to app_list_demo Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase onto master -- probably slightly broken Created 6 years, 4 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 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.
« 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