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

Side by Side Diff: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h

Issue 916833005: [Mac] Use a custom view to implement colored app windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 5 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/apps/native_app_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_APPS_NATIVE_APP_WINDOW_COCOA_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_ 6 #define CHROME_BROWSER_UI_COCOA_APPS_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
11 #include "base/mac/scoped_nsobject.h" 11 #include "base/mac/scoped_nsobject.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #import "chrome/browser/ui/cocoa/browser_command_executor.h" 13 #import "chrome/browser/ui/cocoa/browser_command_executor.h"
14 #include "content/public/browser/web_contents_observer.h" 14 #include "content/public/browser/web_contents_observer.h"
15 #include "extensions/browser/app_window/app_window.h" 15 #include "extensions/browser/app_window/app_window.h"
16 #include "extensions/browser/app_window/native_app_window.h" 16 #include "extensions/browser/app_window/native_app_window.h"
17 #include "extensions/browser/app_window/size_constraints.h" 17 #include "extensions/browser/app_window/size_constraints.h"
18 #include "extensions/common/draggable_region.h" 18 #include "extensions/common/draggable_region.h"
19 #include "ui/base/accelerators/accelerator_manager.h" 19 #include "ui/base/accelerators/accelerator_manager.h"
20 #include "ui/gfx/geometry/rect.h" 20 #include "ui/gfx/geometry/rect.h"
21 21
22 class ExtensionKeybindingRegistryCocoa; 22 class ExtensionKeybindingRegistryCocoa;
23 class NativeAppWindowCocoa; 23 class NativeAppWindowCocoa;
24 @class ShellNSWindow; 24 @class ShellNSWindow;
25 class SkRegion; 25 class SkRegion;
26 @class TitlebarBackgroundView;
26 27
27 // A window controller for a minimal window to host a web app view. Passes 28 // A window controller for a minimal window to host a web app view. Passes
28 // Objective-C notifications to the C++ bridge. 29 // Objective-C notifications to the C++ bridge.
29 @interface NativeAppWindowController : NSWindowController 30 @interface NativeAppWindowController : NSWindowController
30 <NSWindowDelegate, 31 <NSWindowDelegate,
31 BrowserCommandExecutor> { 32 BrowserCommandExecutor> {
32 @private 33 @private
33 NativeAppWindowCocoa* appWindow_; // Weak; owns self. 34 NativeAppWindowCocoa* appWindow_; // Weak; owns self.
34 } 35 }
35 36
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 bool shows_resize_controls_; 200 bool shows_resize_controls_;
200 bool shows_fullscreen_controls_; 201 bool shows_fullscreen_controls_;
201 202
202 extensions::SizeConstraints size_constraints_; 203 extensions::SizeConstraints size_constraints_;
203 204
204 bool has_frame_color_; 205 bool has_frame_color_;
205 SkColor active_frame_color_; 206 SkColor active_frame_color_;
206 SkColor inactive_frame_color_; 207 SkColor inactive_frame_color_;
207 208
208 base::scoped_nsobject<NativeAppWindowController> window_controller_; 209 base::scoped_nsobject<NativeAppWindowController> window_controller_;
210 base::scoped_nsobject<TitlebarBackgroundView> titlebar_background_view_;
209 211
210 // For system drag, the whole window is draggable and the non-draggable areas 212 // For system drag, the whole window is draggable and the non-draggable areas
211 // have to been explicitly excluded. 213 // have to been explicitly excluded.
212 std::vector<extensions::DraggableRegion> draggable_regions_; 214 std::vector<extensions::DraggableRegion> draggable_regions_;
213 215
214 // The Extension Command Registry used to determine which keyboard events to 216 // The Extension Command Registry used to determine which keyboard events to
215 // handle. 217 // handle.
216 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; 218 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_;
217 219
218 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoa); 220 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoa);
219 }; 221 };
220 222
221 #endif // CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_ 223 #endif // CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698