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/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 NSRect boundsRect = [self bounds]; | 54 NSRect boundsRect = [self bounds]; |
55 NSRect searchAreaRect = NSMakeRect(0, 0, | 55 NSRect searchAreaRect = NSMakeRect(0, 0, |
56 NSWidth(boundsRect), kSearchInputHeight); | 56 NSWidth(boundsRect), kSearchInputHeight); |
57 NSRect separatorRect = NSMakeRect(0, NSMaxY(searchAreaRect), | 57 NSRect separatorRect = NSMakeRect(0, NSMaxY(searchAreaRect), |
58 NSWidth(boundsRect), kTopSeparatorSize); | 58 NSWidth(boundsRect), kTopSeparatorSize); |
59 | 59 |
60 [[NSBezierPath bezierPathWithRoundedRect:boundsRect | 60 [[NSBezierPath bezierPathWithRoundedRect:boundsRect |
61 xRadius:kBubbleCornerRadius | 61 xRadius:kBubbleCornerRadius |
62 yRadius:kBubbleCornerRadius] addClip]; | 62 yRadius:kBubbleCornerRadius] addClip]; |
63 | 63 |
64 [gfx::SkColorToSRGBNSColor(app_list::kContentsBackgroundColor) set]; | 64 [skia::SkColorToSRGBNSColor(app_list::kContentsBackgroundColor) set]; |
65 NSRectFill(boundsRect); | 65 NSRectFill(boundsRect); |
66 [gfx::SkColorToSRGBNSColor(app_list::kSearchBoxBackground) set]; | 66 [skia::SkColorToSRGBNSColor(app_list::kSearchBoxBackground) set]; |
67 NSRectFill(searchAreaRect); | 67 NSRectFill(searchAreaRect); |
68 [gfx::SkColorToSRGBNSColor(app_list::kTopSeparatorColor) set]; | 68 [skia::SkColorToSRGBNSColor(app_list::kTopSeparatorColor) set]; |
69 NSRectFill(separatorRect); | 69 NSRectFill(separatorRect); |
70 } | 70 } |
71 | 71 |
72 @end | 72 @end |
73 | 73 |
74 @interface AppListViewController () | 74 @interface AppListViewController () |
75 | 75 |
76 - (void)loadAndSetView; | 76 - (void)loadAndSetView; |
77 - (void)revealSearchResults:(BOOL)show; | 77 - (void)revealSearchResults:(BOOL)show; |
78 | 78 |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 delegate_->OpenSearchResult( | 359 delegate_->OpenSearchResult( |
360 result, false /* auto_launch */, 0 /* event flags */); | 360 result, false /* auto_launch */, 0 /* event flags */); |
361 } | 361 } |
362 } | 362 } |
363 | 363 |
364 - (void)onProfilesChanged { | 364 - (void)onProfilesChanged { |
365 [appsSearchBoxController_ rebuildMenu]; | 365 [appsSearchBoxController_ rebuildMenu]; |
366 } | 366 } |
367 | 367 |
368 @end | 368 @end |
OLD | NEW |