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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/shell_window_cocoa.h

Issue 10823195: Draggable region support for frameless app window on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 8 years, 4 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 | « no previous file | chrome/browser/ui/cocoa/extensions/shell_window_cocoa.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 (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 #include <vector>
9 10
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698