| OLD | NEW |
| 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_COCOA_EXTENSIONS_NATIVE_APP_WINDOW_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_NATIVE_APP_WINDOW_COCOA_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_NATIVE_APP_WINDOW_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_NATIVE_APP_WINDOW_COCOA_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 NativeAppWindowCocoa(ShellWindow* shell_window, | 46 NativeAppWindowCocoa(ShellWindow* shell_window, |
| 47 const ShellWindow::CreateParams& params); | 47 const ShellWindow::CreateParams& params); |
| 48 | 48 |
| 49 // BaseWindow implementation. | 49 // BaseWindow implementation. |
| 50 virtual bool IsActive() const OVERRIDE; | 50 virtual bool IsActive() const OVERRIDE; |
| 51 virtual bool IsMaximized() const OVERRIDE; | 51 virtual bool IsMaximized() const OVERRIDE; |
| 52 virtual bool IsMinimized() const OVERRIDE; | 52 virtual bool IsMinimized() const OVERRIDE; |
| 53 virtual bool IsFullscreen() const OVERRIDE; | 53 virtual bool IsFullscreen() const OVERRIDE; |
| 54 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; | 54 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; |
| 55 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; | 55 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; |
| 56 virtual ui::WindowShowState GetRestoredState() const OVERRIDE; |
| 56 virtual gfx::Rect GetBounds() const OVERRIDE; | 57 virtual gfx::Rect GetBounds() const OVERRIDE; |
| 57 virtual void Show() OVERRIDE; | 58 virtual void Show() OVERRIDE; |
| 58 virtual void ShowInactive() OVERRIDE; | 59 virtual void ShowInactive() OVERRIDE; |
| 59 virtual void Hide() OVERRIDE; | 60 virtual void Hide() OVERRIDE; |
| 60 virtual void Close() OVERRIDE; | 61 virtual void Close() OVERRIDE; |
| 61 virtual void Activate() OVERRIDE; | 62 virtual void Activate() OVERRIDE; |
| 62 virtual void Deactivate() OVERRIDE; | 63 virtual void Deactivate() OVERRIDE; |
| 63 virtual void Maximize() OVERRIDE; | 64 virtual void Maximize() OVERRIDE; |
| 64 virtual void Minimize() OVERRIDE; | 65 virtual void Minimize() OVERRIDE; |
| 65 virtual void Restore() OVERRIDE; | 66 virtual void Restore() OVERRIDE; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // Returns true if |point| in local Cocoa coordinate system falls within | 98 // Returns true if |point| in local Cocoa coordinate system falls within |
| 98 // the draggable region. | 99 // the draggable region. |
| 99 bool IsWithinDraggableRegion(NSPoint point) const; | 100 bool IsWithinDraggableRegion(NSPoint point) const; |
| 100 | 101 |
| 101 bool use_system_drag() const { return use_system_drag_; } | 102 bool use_system_drag() const { return use_system_drag_; } |
| 102 | 103 |
| 103 protected: | 104 protected: |
| 104 // NativeAppWindow implementation. | 105 // NativeAppWindow implementation. |
| 105 virtual void SetFullscreen(bool fullscreen) OVERRIDE; | 106 virtual void SetFullscreen(bool fullscreen) OVERRIDE; |
| 106 virtual bool IsFullscreenOrPending() const OVERRIDE; | 107 virtual bool IsFullscreenOrPending() const OVERRIDE; |
| 108 virtual bool IsDetached() const OVERRIDE; |
| 107 virtual void UpdateWindowIcon() OVERRIDE; | 109 virtual void UpdateWindowIcon() OVERRIDE; |
| 108 virtual void UpdateWindowTitle() OVERRIDE; | 110 virtual void UpdateWindowTitle() OVERRIDE; |
| 109 virtual void UpdateDraggableRegions( | 111 virtual void UpdateDraggableRegions( |
| 110 const std::vector<extensions::DraggableRegion>& regions) OVERRIDE; | 112 const std::vector<extensions::DraggableRegion>& regions) OVERRIDE; |
| 111 virtual void HandleKeyboardEvent( | 113 virtual void HandleKeyboardEvent( |
| 112 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 114 const content::NativeWebKeyboardEvent& event) OVERRIDE; |
| 113 virtual void RenderViewHostChanged() OVERRIDE; | 115 virtual void RenderViewHostChanged() OVERRIDE; |
| 114 virtual gfx::Insets GetFrameInsets() const OVERRIDE; | 116 virtual gfx::Insets GetFrameInsets() const OVERRIDE; |
| 115 | 117 |
| 116 // WebContentsModalDialogHost implementation. | 118 // WebContentsModalDialogHost implementation. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 NSPoint last_mouse_location_; | 174 NSPoint last_mouse_location_; |
| 173 | 175 |
| 174 // The Extension Command Registry used to determine which keyboard events to | 176 // The Extension Command Registry used to determine which keyboard events to |
| 175 // handle. | 177 // handle. |
| 176 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; | 178 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; |
| 177 | 179 |
| 178 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoa); | 180 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoa); |
| 179 }; | 181 }; |
| 180 | 182 |
| 181 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_NATIVE_APP_WINDOW_COCOA_H_ | 183 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_NATIVE_APP_WINDOW_COCOA_H_ |
| OLD | NEW |