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/panels/panel_window_controller_cocoa.h" | 5 #include "chrome/browser/ui/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 18 matching lines...) Expand all Loading... |
29 #include "chrome/browser/ui/panels/panel_bounds_animation.h" | 29 #include "chrome/browser/ui/panels/panel_bounds_animation.h" |
30 #include "chrome/browser/ui/panels/panel_constants.h" | 30 #include "chrome/browser/ui/panels/panel_constants.h" |
31 #include "chrome/browser/ui/panels/panel_manager.h" | 31 #include "chrome/browser/ui/panels/panel_manager.h" |
32 #include "chrome/browser/ui/panels/panel_strip.h" | 32 #include "chrome/browser/ui/panels/panel_strip.h" |
33 #import "chrome/browser/ui/panels/panel_titlebar_view_cocoa.h" | 33 #import "chrome/browser/ui/panels/panel_titlebar_view_cocoa.h" |
34 #import "chrome/browser/ui/panels/panel_utils_cocoa.h" | 34 #import "chrome/browser/ui/panels/panel_utils_cocoa.h" |
35 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 35 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
36 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" | 36 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" |
37 #include "content/public/browser/render_widget_host_view.h" | 37 #include "content/public/browser/render_widget_host_view.h" |
38 #include "content/public/browser/web_contents.h" | 38 #include "content/public/browser/web_contents.h" |
39 #include "grit/ui_resources_standard.h" | 39 #include "grit/ui_resources.h" |
40 #include "skia/ext/skia_utils_mac.h" | 40 #include "skia/ext/skia_utils_mac.h" |
41 #include "ui/base/resource/resource_bundle.h" | 41 #include "ui/base/resource/resource_bundle.h" |
42 #include "ui/gfx/image/image.h" | 42 #include "ui/gfx/image/image.h" |
43 #include "ui/gfx/mac/nsimage_cache.h" | 43 #include "ui/gfx/mac/nsimage_cache.h" |
44 | 44 |
45 using content::WebContents; | 45 using content::WebContents; |
46 | 46 |
47 const int kMinimumWindowSize = 1; | 47 const int kMinimumWindowSize = 1; |
48 const double kBoundsAnimationSpeedPixelsPerSecond = 1000; | 48 const double kBoundsAnimationSpeedPixelsPerSecond = 1000; |
49 const double kBoundsAnimationMaxDurationSeconds = 0.18; | 49 const double kBoundsAnimationMaxDurationSeconds = 0.18; |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 - (NSRect)contentRectForFrameRect:(NSRect)frameRect { | 1045 - (NSRect)contentRectForFrameRect:(NSRect)frameRect { |
1046 NSRect contentRect = [[[self window] contentView] convertRect:frameRect | 1046 NSRect contentRect = [[[self window] contentView] convertRect:frameRect |
1047 fromView:nil]; | 1047 fromView:nil]; |
1048 contentRect.size.height -= panel::kTitlebarHeight; | 1048 contentRect.size.height -= panel::kTitlebarHeight; |
1049 if (contentRect.size.height < 0) | 1049 if (contentRect.size.height < 0) |
1050 contentRect.size.height = 0; | 1050 contentRect.size.height = 0; |
1051 return contentRect; | 1051 return contentRect; |
1052 } | 1052 } |
1053 | 1053 |
1054 @end | 1054 @end |
OLD | NEW |