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

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

Issue 10823176: Cocoa: Support constrained windows for platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment 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
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 9
10 #include "base/memory/scoped_nsobject.h" 10 #include "base/memory/scoped_nsobject.h"
11 #include "chrome/browser/ui/cocoa/constrained_window_mac.h"
11 #include "chrome/browser/ui/extensions/shell_window.h" 12 #include "chrome/browser/ui/extensions/shell_window.h"
12 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
14 #import "third_party/GTM/AppKit/GTMWindowSheetController.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
22 <NSWindowDelegate,
23 GTMWindowSheetControllerDelegate,
24 ConstrainedWindowSupport> {
20 @private 25 @private
21 ShellWindowCocoa* shellWindow_; // Weak; owns self. 26 ShellWindowCocoa* shellWindow_; // Weak; owns self.
Robert Sesek 2012/08/06 22:18:34 nit: two spaces btwn ; and //
sail 2012/08/09 00:25:54 Done.
27 // Manages per-tab sheets.
jeremya 2012/08/05 22:32:47 nit: there are no tabs in shell windows :) perhaps
sail 2012/08/09 00:25:54 Done.
28 scoped_nsobject<GTMWindowSheetController> sheetController_;
22 } 29 }
23 30
24 @property(assign, nonatomic) ShellWindowCocoa* shellWindow; 31 @property(assign, nonatomic) ShellWindowCocoa* shellWindow;
25 32
26 @end 33 @end
27 34
28 // Cocoa bridge to ShellWindow. 35 // Cocoa bridge to ShellWindow.
29 class ShellWindowCocoa : public ShellWindow { 36 class ShellWindowCocoa : public ShellWindow {
30 public: 37 public:
31 ShellWindowCocoa(Profile* profile, 38 ShellWindowCocoa(Profile* profile,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 bool is_fullscreen_; 83 bool is_fullscreen_;
77 NSRect restored_bounds_; 84 NSRect restored_bounds_;
78 85
79 scoped_nsobject<ShellWindowController> window_controller_; 86 scoped_nsobject<ShellWindowController> window_controller_;
80 NSInteger attention_request_id_; // identifier from requestUserAttention 87 NSInteger attention_request_id_; // identifier from requestUserAttention
81 88
82 DISALLOW_COPY_AND_ASSIGN(ShellWindowCocoa); 89 DISALLOW_COPY_AND_ASSIGN(ShellWindowCocoa);
83 }; 90 };
84 91
85 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_SHELL_WINDOW_COCOA_H_ 92 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_SHELL_WINDOW_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698