| 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 "skia/ext/skia_utils_mac.h" | 8 #include "skia/ext/skia_utils_mac.h" |
| 9 #include "ui/app_list/app_list_constants.h" | 9 #include "ui/app_list/app_list_constants.h" |
| 10 #include "ui/app_list/app_list_view_delegate.h" | 10 #include "ui/app_list/app_list_view_delegate.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 [self totalPagesChanged]; | 63 [self totalPagesChanged]; |
| 64 [self selectedPageChanged:0]; | 64 [self selectedPageChanged:0]; |
| 65 [appsGridController_ setPaginationObserver:self]; | 65 [appsGridController_ setPaginationObserver:self]; |
| 66 } | 66 } |
| 67 return self; | 67 return self; |
| 68 } | 68 } |
| 69 | 69 |
| 70 - (void)dealloc { | 70 - (void)dealloc { |
| 71 [appsGridController_ setPaginationObserver:nil]; | 71 [appsGridController_ setPaginationObserver:nil]; |
| 72 [appsGridController_ setDelegate:NULL]; | 72 [appsGridController_ setDelegate:NULL]; |
| 73 delegate_.reset(); |
| 73 [super dealloc]; | 74 [super dealloc]; |
| 74 } | 75 } |
| 75 | 76 |
| 76 - (AppsGridController*)appsGridController { | 77 - (AppsGridController*)appsGridController { |
| 77 return appsGridController_; | 78 return appsGridController_; |
| 78 } | 79 } |
| 79 | 80 |
| 80 - (NSSegmentedControl*)pagerControl { | 81 - (NSSegmentedControl*)pagerControl { |
| 81 return pagerControl_; | 82 return pagerControl_; |
| 82 } | 83 } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 [pagerControl_ setFrameOrigin: | 140 [pagerControl_ setFrameOrigin: |
| 140 NSMakePoint(NSMidX(viewFrame) - NSMidX([pagerControl_ bounds]), | 141 NSMakePoint(NSMidX(viewFrame) - NSMidX([pagerControl_ bounds]), |
| 141 kViewPagerOffsetY)]; | 142 kViewPagerOffsetY)]; |
| 142 } | 143 } |
| 143 | 144 |
| 144 - (void)selectedPageChanged:(int)newSelected { | 145 - (void)selectedPageChanged:(int)newSelected { |
| 145 [pagerControl_ selectSegmentWithTag:newSelected]; | 146 [pagerControl_ selectSegmentWithTag:newSelected]; |
| 146 } | 147 } |
| 147 | 148 |
| 148 @end | 149 @end |
| OLD | NEW |