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

Unified Diff: ui/views/widget/native_widget_mac.h

Issue 249113002: MacViews: Adds NativeWidgetMac and gets views target compiling on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ash -> aura Created 6 years, 7 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/views.gyp ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_mac.h
diff --git a/ui/views/widget/native_widget_mac.h b/ui/views/widget/native_widget_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..74a3721b0d2d2b3f03a0f629c59374d77bf4a899
--- /dev/null
+++ b/ui/views/widget/native_widget_mac.h
@@ -0,0 +1,117 @@
+// Copyright 2014 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.
+
+#ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_
+#define UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_
+
+#include "base/mac/scoped_nsobject.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/views/widget/native_widget_private.h"
+
+namespace views {
+
+class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate {
+ public:
+ NativeWidgetMac(internal::NativeWidgetDelegate* delegate);
+ virtual ~NativeWidgetMac();
+
+ protected:
+ // internal::NativeWidgetPrivate:
+ virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE;
+ virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE;
+ virtual bool ShouldUseNativeFrame() const OVERRIDE;
+ virtual bool ShouldWindowContentsBeTransparent() const OVERRIDE;
+ virtual void FrameTypeChanged() OVERRIDE;
+ virtual Widget* GetWidget() OVERRIDE;
+ virtual const Widget* GetWidget() const OVERRIDE;
+ virtual gfx::NativeView GetNativeView() const OVERRIDE;
+ virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE;
+ virtual Widget* GetTopLevelWidget() OVERRIDE;
+ virtual const ui::Compositor* GetCompositor() const OVERRIDE;
+ virtual ui::Compositor* GetCompositor() OVERRIDE;
+ virtual ui::Layer* GetLayer() OVERRIDE;
+ virtual void ReorderNativeViews() OVERRIDE;
+ virtual void ViewRemoved(View* view) OVERRIDE;
+ virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE;
+ virtual void* GetNativeWindowProperty(const char* name) const OVERRIDE;
+ virtual TooltipManager* GetTooltipManager() const OVERRIDE;
+ virtual void SetCapture() OVERRIDE;
+ virtual void ReleaseCapture() OVERRIDE;
+ virtual bool HasCapture() const OVERRIDE;
+ virtual InputMethod* CreateInputMethod() OVERRIDE;
+ virtual InputMethodDelegate* GetInputMethodDelegate() OVERRIDE;
+ virtual ui::InputMethod* GetHostInputMethod() OVERRIDE;
+ virtual void CenterWindow(const gfx::Size& size) OVERRIDE;
+ virtual void GetWindowPlacement(
+ gfx::Rect* bounds,
+ ui::WindowShowState* maximized) const OVERRIDE;
+ virtual bool SetWindowTitle(const base::string16& title) OVERRIDE;
+ virtual void SetWindowIcons(const gfx::ImageSkia& window_icon,
+ const gfx::ImageSkia& app_icon) OVERRIDE;
+ virtual void InitModalType(ui::ModalType modal_type) OVERRIDE;
+ virtual gfx::Rect GetWindowBoundsInScreen() const OVERRIDE;
+ virtual gfx::Rect GetClientAreaBoundsInScreen() const OVERRIDE;
+ virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
+ virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
+ virtual void SetSize(const gfx::Size& size) OVERRIDE;
+ virtual void StackAbove(gfx::NativeView native_view) OVERRIDE;
+ virtual void StackAtTop() OVERRIDE;
+ virtual void StackBelow(gfx::NativeView native_view) OVERRIDE;
+ virtual void SetShape(gfx::NativeRegion shape) OVERRIDE;
+ virtual void Close() OVERRIDE;
+ virtual void CloseNow() OVERRIDE;
+ virtual void Show() OVERRIDE;
+ virtual void Hide() OVERRIDE;
+ virtual void ShowMaximizedWithBounds(
+ const gfx::Rect& restored_bounds) OVERRIDE;
+ virtual void ShowWithWindowState(ui::WindowShowState state) OVERRIDE;
+ virtual bool IsVisible() const OVERRIDE;
+ virtual void Activate() OVERRIDE;
+ virtual void Deactivate() OVERRIDE;
+ virtual bool IsActive() const OVERRIDE;
+ virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE;
+ virtual bool IsAlwaysOnTop() const OVERRIDE;
+ virtual void SetVisibleOnAllWorkspaces(bool always_visible) OVERRIDE;
+ virtual void Maximize() OVERRIDE;
+ virtual void Minimize() OVERRIDE;
+ virtual bool IsMaximized() const OVERRIDE;
+ virtual bool IsMinimized() const OVERRIDE;
+ virtual void Restore() OVERRIDE;
+ virtual void SetFullscreen(bool fullscreen) OVERRIDE;
+ virtual bool IsFullscreen() const OVERRIDE;
+ virtual void SetOpacity(unsigned char opacity) OVERRIDE;
+ virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE;
+ virtual void FlashFrame(bool flash_frame) OVERRIDE;
+ virtual void RunShellDrag(View* view,
+ const ui::OSExchangeData& data,
+ const gfx::Point& location,
+ int operation,
+ ui::DragDropTypes::DragEventSource source) OVERRIDE;
+ virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE;
+ virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
+ virtual bool IsMouseEventsEnabled() const OVERRIDE;
+ virtual void ClearNativeFocus() OVERRIDE;
+ virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE;
+ virtual Widget::MoveLoopResult RunMoveLoop(
+ const gfx::Vector2d& drag_offset,
+ Widget::MoveLoopSource source,
+ Widget::MoveLoopEscapeBehavior escape_behavior) OVERRIDE;
+ virtual void EndMoveLoop() OVERRIDE;
+ virtual void SetVisibilityChangedAnimationsEnabled(bool value) OVERRIDE;
+ virtual ui::NativeTheme* GetNativeTheme() const OVERRIDE;
+ virtual void OnRootViewLayout() const OVERRIDE;
+
+ // NativeWidget:
+ virtual ui::EventHandler* GetEventHandler() OVERRIDE;
+
+ private:
+ internal::NativeWidgetDelegate* delegate_;
+ base::scoped_nsobject<NSWindow> window_;
+
+ DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698