| OLD | NEW |
| 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 #include "chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "chrome/browser/ui/panels/panel_constants.h" | 31 #include "chrome/browser/ui/panels/panel_constants.h" |
| 32 #include "chrome/browser/ui/panels/panel_manager.h" | 32 #include "chrome/browser/ui/panels/panel_manager.h" |
| 33 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 33 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 34 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" | 34 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" |
| 35 #include "content/public/browser/render_widget_host_view.h" | 35 #include "content/public/browser/render_widget_host_view.h" |
| 36 #include "content/public/browser/web_contents.h" | 36 #include "content/public/browser/web_contents.h" |
| 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" | 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" |
| 38 #include "grit/ui_resources.h" | 38 #include "grit/ui_resources.h" |
| 39 #include "ui/base/resource/resource_bundle.h" | 39 #include "ui/base/resource/resource_bundle.h" |
| 40 #include "ui/gfx/image/image.h" | 40 #include "ui/gfx/image/image.h" |
| 41 #include "webkit/glue/webcursor.h" | 41 #include "webkit/common/cursors/webcursor.h" |
| 42 | 42 |
| 43 using content::WebContents; | 43 using content::WebContents; |
| 44 | 44 |
| 45 const int kMinimumWindowSize = 1; | 45 const int kMinimumWindowSize = 1; |
| 46 const double kBoundsAnimationSpeedPixelsPerSecond = 1000; | 46 const double kBoundsAnimationSpeedPixelsPerSecond = 1000; |
| 47 const double kBoundsAnimationMaxDurationSeconds = 0.18; | 47 const double kBoundsAnimationMaxDurationSeconds = 0.18; |
| 48 | 48 |
| 49 // Resize edge thickness, in screen pixels. | 49 // Resize edge thickness, in screen pixels. |
| 50 const double kWidthOfMouseResizeArea = 4.0; | 50 const double kWidthOfMouseResizeArea = 4.0; |
| 51 | 51 |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 - (NSRect)contentRectForFrameRect:(NSRect)frameRect { | 951 - (NSRect)contentRectForFrameRect:(NSRect)frameRect { |
| 952 NSRect contentRect = [[[self window] contentView] convertRect:frameRect | 952 NSRect contentRect = [[[self window] contentView] convertRect:frameRect |
| 953 fromView:nil]; | 953 fromView:nil]; |
| 954 contentRect.size.height -= panel::kTitlebarHeight; | 954 contentRect.size.height -= panel::kTitlebarHeight; |
| 955 if (contentRect.size.height < 0) | 955 if (contentRect.size.height < 0) |
| 956 contentRect.size.height = 0; | 956 contentRect.size.height = 0; |
| 957 return contentRect; | 957 return contentRect; |
| 958 } | 958 } |
| 959 | 959 |
| 960 @end | 960 @end |
| OLD | NEW |