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

Unified Diff: chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h

Issue 23918002: Switch to doing user-resizing via system for panels on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to reland Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h
diff --git a/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h b/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h
index 52462db58301070fb0d7d57d97ffe4766e30327e..3ca0211bb1dcd16cd86ccf9c9617e8aedeb73d6a 100644
--- a/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h
+++ b/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h
@@ -15,6 +15,7 @@
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/chrome_browser_window.h"
#include "chrome/browser/ui/panels/panel.h"
+#import "ui/base/cocoa/tracking_area.h"
class PanelCocoa;
@class PanelTitlebarViewCocoa;
@@ -42,12 +43,17 @@ class PanelCocoa;
// window over other application windows due to panels having a higher
// priority NSWindowLevel, so we distinguish between the two scenarios.
BOOL activationRequestedByPanel_;
- base::scoped_nsobject<NSView> overlayView_;
+ // Is user resizing in progress?
+ BOOL userResizing_;
+ // Tracks the whole window in order to receive NSMouseMoved event.
+ ui::ScopedCrTrackingArea trackingArea_;
}
// Load the window nib and do any Cocoa-specific initialization.
- (id)initWithPanel:(PanelCocoa*)window;
+- (Panel*)panel;
+
- (void)webContentsInserted:(content::WebContents*)contents;
- (void)webContentsDetached:(content::WebContents*)contents;
@@ -137,8 +143,9 @@ class PanelCocoa;
// Adjusts NSWindowCollectionBehavior based on whether panel is always on top.
- (void)updateWindowCollectionBehavior;
-// Turns on user-resizable corners/sides indications and enables live resize.
-- (void)enableResizeByMouse:(BOOL)enable;
+// Updates the tracking area per the window size change. This is needed in
+// order to receive the NSMouseMoved notification.
+- (void)updateTrackingArea;
// Turns on/off shadow effect around the window shape.
- (void)showShadow:(BOOL)show;
@@ -148,6 +155,10 @@ class PanelCocoa;
// Returns true if the window is minimized to the dock.
- (BOOL)isMiniaturized;
+// Returns true if the user-resizing is allowed for the edge/corner close to
+// current mouse location.
+- (BOOL)canResizeByMouseAtCurrentLocation;
+
- (NSRect)frameRectForContentRect:(NSRect)contentRect;
- (NSRect)contentRectForFrameRect:(NSRect)frameRect;
« no previous file with comments | « chrome/browser/ui/cocoa/panels/panel_utils_cocoa.mm ('k') | chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698