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

Side by Side Diff: ui/aura/root_window_host_mac.h

Issue 110283005: Make aura_demo work on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix resolve Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/env.cc ('k') | ui/aura/root_window_host_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_AURA_ROOT_WINDOW_HOST_OZONE_H_ 5 #ifndef UI_AURA_ROOT_WINDOW_HOST_MAC_H_
6 #define UI_AURA_ROOT_WINDOW_HOST_OZONE_H_ 6 #define UI_AURA_ROOT_WINDOW_HOST_MAC_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/mac/scoped_nsobject.h"
11 #include "base/message_loop/message_loop.h" 11 #include "ui/aura/aura_export.h"
12 #include "ui/aura/window_tree_host.h" 12 #include "ui/aura/window_tree_host.h"
13 #include "ui/gfx/insets.h" 13 #include "ui/gfx/insets.h"
14 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 15
16 namespace ui {
17 class MouseEvent;
18 }
19
16 namespace aura { 20 namespace aura {
17 21
18 class RootWindowHostOzone : public RootWindowHost, 22 namespace internal {
19 public base::MessageLoop::Dispatcher { 23 class TouchEventCalibrate;
24 }
25
26 class AURA_EXPORT RootWindowHostMac : public RootWindowHost {
20 public: 27 public:
21 explicit RootWindowHostOzone(const gfx::Rect& bounds); 28 explicit RootWindowHostMac(const gfx::Rect& bounds);
22 virtual ~RootWindowHostOzone(); 29 virtual ~RootWindowHostMac();
23 30
24 private: 31 private:
25 // Overridden from Dispatcher overrides:
26 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
27
28 // RootWindowHost Overrides. 32 // RootWindowHost Overrides.
29 virtual RootWindow* GetRootWindow() OVERRIDE; 33 virtual RootWindow* GetRootWindow() OVERRIDE;
30 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 34 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
31 virtual void Show() OVERRIDE; 35 virtual void Show() OVERRIDE;
32 virtual void Hide() OVERRIDE; 36 virtual void Hide() OVERRIDE;
33 virtual void ToggleFullScreen() OVERRIDE; 37 virtual void ToggleFullScreen() OVERRIDE;
34 virtual gfx::Rect GetBounds() const OVERRIDE; 38 virtual gfx::Rect GetBounds() const OVERRIDE;
35 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 39 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
36 virtual gfx::Insets GetInsets() const OVERRIDE; 40 virtual gfx::Insets GetInsets() const OVERRIDE;
37 virtual void SetInsets(const gfx::Insets& bounds) OVERRIDE; 41 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE;
38 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; 42 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
39 virtual void SetCapture() OVERRIDE; 43 virtual void SetCapture() OVERRIDE;
40 virtual void ReleaseCapture() OVERRIDE; 44 virtual void ReleaseCapture() OVERRIDE;
41 virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE; 45 virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE;
42 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE; 46 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE;
43 virtual bool ConfineCursorToRootWindow() OVERRIDE; 47 virtual bool ConfineCursorToRootWindow() OVERRIDE;
44 virtual void UnConfineCursor() OVERRIDE; 48 virtual void UnConfineCursor() OVERRIDE;
45 virtual void OnCursorVisibilityChanged(bool show) OVERRIDE; 49 virtual void OnCursorVisibilityChanged(bool show) OVERRIDE;
46 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; 50 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
47 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE; 51 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE;
48 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; 52 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
49 virtual void PrepareForShutdown() OVERRIDE; 53 virtual void PrepareForShutdown() OVERRIDE;
50 54
51 gfx::AcceleratedWidget widget_; 55 private:
52 gfx::Rect bounds_; 56 base::scoped_nsobject<NSWindow> window_;
53 57
54 DISALLOW_COPY_AND_ASSIGN(RootWindowHostOzone); 58 DISALLOW_COPY_AND_ASSIGN(RootWindowHostMac);
55 }; 59 };
56 60
57 } // namespace aura 61 } // namespace aura
58 62
59 #endif // UI_AURA_ROOT_WINDOW_HOST_OZONE_H_ 63 #endif // UI_AURA_ROOT_WINDOW_HOST_MAC_H_
OLDNEW
« no previous file with comments | « ui/aura/env.cc ('k') | ui/aura/root_window_host_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698