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

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

Issue 1053303003: [MacViews] Implement colored window frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 7 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
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 AppNSWindow; 22 @class AppNSWindow;
23 class ExtensionKeybindingRegistryCocoa; 23 class ExtensionKeybindingRegistryCocoa;
24 class NativeAppWindowCocoa; 24 class NativeAppWindowCocoa;
25 class SkRegion; 25 class SkRegion;
26 @class TitlebarBackgroundView;
27 26
28 // A window controller for a minimal window to host a web app view. Passes 27 // A window controller for a minimal window to host a web app view. Passes
29 // Objective-C notifications to the C++ bridge. 28 // Objective-C notifications to the C++ bridge.
30 @interface NativeAppWindowController : NSWindowController 29 @interface NativeAppWindowController : NSWindowController
31 <NSWindowDelegate, 30 <NSWindowDelegate,
32 BrowserCommandExecutor> { 31 BrowserCommandExecutor> {
33 @private 32 @private
34 NativeAppWindowCocoa* appWindow_; // Weak; owns self. 33 NativeAppWindowCocoa* appWindow_; // Weak; owns self.
35 } 34 }
36 35
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 bool shows_resize_controls_; 198 bool shows_resize_controls_;
200 bool shows_fullscreen_controls_; 199 bool shows_fullscreen_controls_;
201 200
202 extensions::SizeConstraints size_constraints_; 201 extensions::SizeConstraints size_constraints_;
203 202
204 bool has_frame_color_; 203 bool has_frame_color_;
205 SkColor active_frame_color_; 204 SkColor active_frame_color_;
206 SkColor inactive_frame_color_; 205 SkColor inactive_frame_color_;
207 206
208 base::scoped_nsobject<NativeAppWindowController> window_controller_; 207 base::scoped_nsobject<NativeAppWindowController> window_controller_;
209 base::scoped_nsobject<TitlebarBackgroundView> titlebar_background_view_;
210 208
211 // For system drag, the whole window is draggable and the non-draggable areas 209 // For system drag, the whole window is draggable and the non-draggable areas
212 // have to been explicitly excluded. 210 // have to been explicitly excluded.
213 std::vector<extensions::DraggableRegion> draggable_regions_; 211 std::vector<extensions::DraggableRegion> draggable_regions_;
214 212
215 // The Extension Command Registry used to determine which keyboard events to 213 // The Extension Command Registry used to determine which keyboard events to
216 // handle. 214 // handle.
217 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; 215 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_;
218 216
219 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoa); 217 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoa);
220 }; 218 };
221 219
222 #endif // CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_ 220 #endif // CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698