| OLD | NEW |
| 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 #import "ui/app_list/cocoa/app_list_view_controller.h" | 5 #import "ui/app_list/cocoa/app_list_view_controller.h" |
| 6 | 6 |
| 7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #include "skia/ext/skia_utils_mac.h" | 10 #include "skia/ext/skia_utils_mac.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 pagerControl_.reset([[AppListPagerView alloc] init]); | 190 pagerControl_.reset([[AppListPagerView alloc] init]); |
| 191 [pagerControl_ setTarget:appsGridController_]; | 191 [pagerControl_ setTarget:appsGridController_]; |
| 192 [pagerControl_ setAction:@selector(onPagerClicked:)]; | 192 [pagerControl_ setAction:@selector(onPagerClicked:)]; |
| 193 | 193 |
| 194 NSRect gridFrame = [[appsGridController_ view] frame]; | 194 NSRect gridFrame = [[appsGridController_ view] frame]; |
| 195 NSRect contentsRect = NSMakeRect(0, kSearchInputHeight + kTopSeparatorSize, | 195 NSRect contentsRect = NSMakeRect(0, kSearchInputHeight + kTopSeparatorSize, |
| 196 NSWidth(gridFrame), NSHeight(gridFrame) + kPagerPreferredHeight - | 196 NSWidth(gridFrame), NSHeight(gridFrame) + kPagerPreferredHeight - |
| 197 [AppsGridController scrollerPadding]); | 197 [AppsGridController scrollerPadding]); |
| 198 | 198 |
| 199 contentsView_.reset([[FlippedView alloc] initWithFrame:contentsRect]); | 199 contentsView_.reset([[FlippedView alloc] initWithFrame:contentsRect]); |
| 200 |
| 201 // The contents view contains animations both from an NSCollectionView and the |
| 202 // app list's own transitive drag layers. Ensure the subviews have access to |
| 203 // a compositing layer they can share. |
| 204 [contentsView_ setWantsLayer:YES]; |
| 205 |
| 200 backgroundView_.reset( | 206 backgroundView_.reset( |
| 201 [[BackgroundView alloc] initWithFrame: | 207 [[BackgroundView alloc] initWithFrame: |
| 202 NSMakeRect(0, 0, NSMaxX(contentsRect), NSMaxY(contentsRect))]); | 208 NSMakeRect(0, 0, NSMaxX(contentsRect), NSMaxY(contentsRect))]); |
| 203 appsSearchBoxController_.reset( | 209 appsSearchBoxController_.reset( |
| 204 [[AppsSearchBoxController alloc] initWithFrame: | 210 [[AppsSearchBoxController alloc] initWithFrame: |
| 205 NSMakeRect(0, 0, NSWidth(contentsRect), kSearchInputHeight)]); | 211 NSMakeRect(0, 0, NSWidth(contentsRect), kSearchInputHeight)]); |
| 206 appsSearchResultsController_.reset( | 212 appsSearchResultsController_.reset( |
| 207 [[AppsSearchResultsController alloc] initWithAppsSearchResultsFrameSize: | 213 [[AppsSearchResultsController alloc] initWithAppsSearchResultsFrameSize: |
| 208 [contentsView_ bounds].size]); | 214 [contentsView_ bounds].size]); |
| 209 base::scoped_nsobject<NSView> containerView( | 215 base::scoped_nsobject<NSView> containerView( |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 372 |
| 367 [backgroundView_ setHidden:YES]; | 373 [backgroundView_ setHidden:YES]; |
| 368 signinViewController_.reset( | 374 signinViewController_.reset( |
| 369 [[SigninViewController alloc] initWithFrame:[backgroundView_ frame] | 375 [[SigninViewController alloc] initWithFrame:[backgroundView_ frame] |
| 370 cornerRadius:kBubbleCornerRadius | 376 cornerRadius:kBubbleCornerRadius |
| 371 delegate:signinDelegate]); | 377 delegate:signinDelegate]); |
| 372 [[self view] addSubview:[signinViewController_ view]]; | 378 [[self view] addSubview:[signinViewController_ view]]; |
| 373 } | 379 } |
| 374 | 380 |
| 375 @end | 381 @end |
| OLD | NEW |