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

Side by Side Diff: ui/app_list/cocoa/app_list_view_controller.mm

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "skia/ext/skia_utils_mac.h" 9 #include "skia/ext/skia_utils_mac.h"
10 #include "ui/app_list/app_list_constants.h" 10 #include "ui/app_list/app_list_constants.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 pagerControl_.reset([[AppListPagerView alloc] init]); 134 pagerControl_.reset([[AppListPagerView alloc] init]);
135 [pagerControl_ setTarget:appsGridController_]; 135 [pagerControl_ setTarget:appsGridController_];
136 [pagerControl_ setAction:@selector(onPagerClicked:)]; 136 [pagerControl_ setAction:@selector(onPagerClicked:)];
137 137
138 NSRect gridFrame = [[appsGridController_ view] frame]; 138 NSRect gridFrame = [[appsGridController_ view] frame];
139 NSRect contentsRect = NSMakeRect(0, kSearchInputHeight + kTopSeparatorSize, 139 NSRect contentsRect = NSMakeRect(0, kSearchInputHeight + kTopSeparatorSize,
140 NSWidth(gridFrame), NSHeight(gridFrame) + kPagerPreferredHeight - 140 NSWidth(gridFrame), NSHeight(gridFrame) + kPagerPreferredHeight -
141 [AppsGridController scrollerPadding]); 141 [AppsGridController scrollerPadding]);
142 142
143 contentsView_.reset([[FlippedView alloc] initWithFrame:contentsRect]); 143 contentsView_.reset([[FlippedView alloc] initWithFrame:contentsRect]);
144 scoped_nsobject<BackgroundView> backgroundView( 144 base::scoped_nsobject<BackgroundView> backgroundView(
145 [[BackgroundView alloc] initWithFrame: 145 [[BackgroundView alloc] initWithFrame:
146 NSMakeRect(0, 0, NSMaxX(contentsRect), NSMaxY(contentsRect))]); 146 NSMakeRect(0, 0, NSMaxX(contentsRect), NSMaxY(contentsRect))]);
147 appsSearchBoxController_.reset( 147 appsSearchBoxController_.reset(
148 [[AppsSearchBoxController alloc] initWithFrame: 148 [[AppsSearchBoxController alloc] initWithFrame:
149 NSMakeRect(0, 0, NSWidth(contentsRect), kSearchInputHeight)]); 149 NSMakeRect(0, 0, NSWidth(contentsRect), kSearchInputHeight)]);
150 appsSearchResultsController_.reset( 150 appsSearchResultsController_.reset(
151 [[AppsSearchResultsController alloc] initWithAppsSearchResultsFrameSize: 151 [[AppsSearchResultsController alloc] initWithAppsSearchResultsFrameSize:
152 [contentsView_ bounds].size]); 152 [contentsView_ bounds].size]);
153 153
154 [contentsView_ addSubview:[appsGridController_ view]]; 154 [contentsView_ addSubview:[appsGridController_ view]];
155 [contentsView_ addSubview:pagerControl_]; 155 [contentsView_ addSubview:pagerControl_];
156 [backgroundView addSubview:contentsView_]; 156 [backgroundView addSubview:contentsView_];
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } 271 }
272 272
273 - (void)openResult:(app_list::SearchResult*)result { 273 - (void)openResult:(app_list::SearchResult*)result {
274 if (delegate_) 274 if (delegate_)
275 delegate_->OpenSearchResult(result, 0 /* event flags */); 275 delegate_->OpenSearchResult(result, 0 /* event flags */);
276 276
277 [appsSearchBoxController_ clearSearch]; 277 [appsSearchBoxController_ clearSearch];
278 } 278 }
279 279
280 @end 280 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698