summaryrefslogtreecommitdiffstats
path: root/ui/aura/root_window_mac.mm
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 03:15:34 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 03:15:34 +0000
commit6f637730a38de10a1173f05e48271483d27b648d (patch)
tree44bacffdd54e6b8d28215b4a7ccd9a06bbeb88ef /ui/aura/root_window_mac.mm
parente48c61d39a63a10675af85eb9417ed453eea6a6a (diff)
downloadchromium_src-6f637730a38de10a1173f05e48271483d27b648d.zip
chromium_src-6f637730a38de10a1173f05e48271483d27b648d.tar.gz
chromium_src-6f637730a38de10a1173f05e48271483d27b648d.tar.bz2
Aura Shell needs to exist on Mac
Adds first cut at "Aura Shell.app" on Mac. The 'ash_shell' is extended to generate a Cocoa application. This application brings up a single window containing the Aura desktop. The main view of this window provides an accelerated surface to Aura in which it can composite and draw its results. What works: - The application launches and renders the Aura desktop and background - Mouse movement, clicking, double-clicking, and interactions with Aura windows and widgets - Text buttons render with Skia text (needs improvement) - Non-modal transient window button - Window-modal window button - System-modal window button - Example Widgets button (checkboxes, radios, buttons) - Lock Screen button - Create Non-Resizable window button - Create Pointy Bubble button - Create Widow button - Switcher and Taskbar What doesn't work: - Open Views Examples Window button - Views menus - Views scrollbars - Views accelerators - Views tooltips - Drag and drop - Anything involving MessageLoop dispatcher logic - Mouse movement doesn't pass through to Aura when mouse button is up Note: Required .gyp flags are: 'use_aura': 1, 'use_webkit_compositor': 1, BUG=109946 TEST=Manual tests. R=sky@chromium.org, thakis@chromium.org Review URL: https://chromiumcodereview.appspot.com/9232028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/root_window_mac.mm')
-rw-r--r--ui/aura/root_window_mac.mm35
1 files changed, 35 insertions, 0 deletions
diff --git a/ui/aura/root_window_mac.mm b/ui/aura/root_window_mac.mm
new file mode 100644
index 0000000..32e42b7
--- /dev/null
+++ b/ui/aura/root_window_mac.mm
@@ -0,0 +1,35 @@
+// 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.
+
+#import "ui/aura/root_window_mac.h"
+
+#include "ui/aura/root_window_host_mac.h"
+
+@implementation RootWindowMac
+
+- (id)initWithContentRect:(NSRect)contentRect
+ styleMask:(NSUInteger)windowStyle
+ backing:(NSBackingStoreType)bufferingType
+ defer:(BOOL)deferCreation {
+ if ((self = [super initWithContentRect:contentRect
+ styleMask:windowStyle
+ backing:bufferingType
+ defer:deferCreation])) {
+ hostDelegate_ = NULL;
+ }
+ return self;
+}
+
+- (void)setHostDelegate:(aura::RootWindowHostMacDelegate*)hostDelegate {
+ hostDelegate_ = hostDelegate;
+}
+
+- (void)sendEvent:(NSEvent*)event {
+ // Allow both the Cocoa machinery and the Aura machinery to handle the event.
+ [super sendEvent:event];
+ if (hostDelegate_)
+ hostDelegate_->SendEvent(event);
+}
+
+@end