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_SHELL_WINDOW_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_SHELL_WINDOW_COCOA_H_ |
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_SHELL_WINDOW_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_SHELL_WINDOW_COCOA_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include <vector> | |
Robert Sesek
2012/08/09 14:52:44
Line 9 should be after this, not before.
| |
10 #include "base/memory/scoped_nsobject.h" | 11 #include "base/memory/scoped_nsobject.h" |
11 #include "chrome/browser/ui/extensions/shell_window.h" | 12 #include "chrome/browser/ui/extensions/shell_window.h" |
13 #include "chrome/common/extensions/draggable_region.h" | |
12 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
13 | 15 |
14 class Profile; | 16 class Profile; |
15 class ShellWindowCocoa; | 17 class ShellWindowCocoa; |
16 | 18 |
17 // A window controller for a minimal window to host a web app view. Passes | 19 // A window controller for a minimal window to host a web app view. Passes |
18 // Objective-C notifications to the C++ bridge. | 20 // Objective-C notifications to the C++ bridge. |
19 @interface ShellWindowController : NSWindowController<NSWindowDelegate> { | 21 @interface ShellWindowController : NSWindowController<NSWindowDelegate> { |
20 @private | 22 @private |
21 ShellWindowCocoa* shellWindow_; // Weak; owns self. | 23 ShellWindowCocoa* shellWindow_; // Weak; owns self. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 void WindowDidResignKey(); | 65 void WindowDidResignKey(); |
64 | 66 |
65 protected: | 67 protected: |
66 // ShellWindow implementation. | 68 // ShellWindow implementation. |
67 virtual void SetFullscreen(bool fullscreen) OVERRIDE; | 69 virtual void SetFullscreen(bool fullscreen) OVERRIDE; |
68 virtual bool IsFullscreenOrPending() const OVERRIDE; | 70 virtual bool IsFullscreenOrPending() const OVERRIDE; |
69 | 71 |
70 private: | 72 private: |
71 virtual ~ShellWindowCocoa(); | 73 virtual ~ShellWindowCocoa(); |
72 | 74 |
75 // ShellWindow implementation. | |
76 virtual void UpdateDraggableRegions( | |
77 const std::vector<extensions::DraggableRegion>& regions) OVERRIDE; | |
78 | |
73 NSWindow* window() const; | 79 NSWindow* window() const; |
74 | 80 |
75 void InstallView(); | 81 void InstallView(); |
76 void UninstallView(); | 82 void UninstallView(); |
83 void InstallDraggableRegionViews(); | |
77 | 84 |
78 bool has_frame_; | 85 bool has_frame_; |
79 | 86 |
80 bool is_fullscreen_; | 87 bool is_fullscreen_; |
81 NSRect restored_bounds_; | 88 NSRect restored_bounds_; |
82 | 89 |
83 scoped_nsobject<ShellWindowController> window_controller_; | 90 scoped_nsobject<ShellWindowController> window_controller_; |
84 NSInteger attention_request_id_; // identifier from requestUserAttention | 91 NSInteger attention_request_id_; // identifier from requestUserAttention |
85 | 92 |
93 std::vector<extensions::DraggableRegion> draggable_regions_; | |
94 | |
86 DISALLOW_COPY_AND_ASSIGN(ShellWindowCocoa); | 95 DISALLOW_COPY_AND_ASSIGN(ShellWindowCocoa); |
87 }; | 96 }; |
88 | 97 |
89 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_SHELL_WINDOW_COCOA_H_ | 98 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_SHELL_WINDOW_COCOA_H_ |
OLD | NEW |