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

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

Issue 1391893003: NOT FOR REVIEW: Aura on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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/apps_search_box_controller.h" 5 #import "ui/app_list/cocoa/apps_search_box_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/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSBezierPath+RoundRect .h" 10 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSBezierPath+RoundRect .h"
11 #include "ui/app_list/app_list_menu.h" 11 #include "ui/app_list/app_list_menu.h"
12 #include "ui/app_list/app_list_model.h" 12 #include "ui/app_list/app_list_model.h"
13 #include "ui/app_list/resources/grit/app_list_resources.h"
13 #include "ui/app_list/search_box_model.h" 14 #include "ui/app_list/search_box_model.h"
14 #include "ui/app_list/search_box_model_observer.h" 15 #include "ui/app_list/search_box_model_observer.h"
15 #import "ui/base/cocoa/controls/hover_image_menu_button.h" 16 #import "ui/base/cocoa/controls/hover_image_menu_button.h"
16 #import "ui/base/cocoa/controls/hover_image_menu_button_cell.h" 17 #import "ui/base/cocoa/controls/hover_image_menu_button_cell.h"
17 #import "ui/base/cocoa/menu_controller.h" 18 #import "ui/base/cocoa/menu_controller.h"
18 #include "ui/base/resource/resource_bundle.h" 19 #include "ui/base/resource/resource_bundle.h"
19 #include "ui/gfx/image/image_skia_util_mac.h" 20 #include "ui/gfx/image/image_skia_util_mac.h"
20 #include "ui/resources/grit/ui_resources.h"
21 21
22 namespace { 22 namespace {
23 23
24 // Padding either side of the search icon and menu button. 24 // Padding either side of the search icon and menu button.
25 const CGFloat kPadding = 14; 25 const CGFloat kPadding = 14;
26 26
27 // Size of the search icon. 27 // Size of the search icon.
28 const CGFloat kSearchIconDimension = 32; 28 const CGFloat kSearchIconDimension = 32;
29 29
30 // Size of the menu button on the right. 30 // Size of the menu button on the right.
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 NSPoint anchorPoint = [[menuButton window] convertBaseToScreen:NSMakePoint( 387 NSPoint anchorPoint = [[menuButton window] convertBaseToScreen:NSMakePoint(
388 NSMaxX(anchorRect) + kMenuXOffsetFromButton, 388 NSMaxX(anchorRect) + kMenuXOffsetFromButton,
389 NSMinY(anchorRect) - kMenuYOffsetFromButton)]; 389 NSMinY(anchorRect) - kMenuYOffsetFromButton)];
390 NSRect confinementRect = [[menuButton window] frame]; 390 NSRect confinementRect = [[menuButton window] frame];
391 confinementRect.size = NSMakeSize(anchorPoint.x - NSMinX(confinementRect), 391 confinementRect.size = NSMakeSize(anchorPoint.x - NSMinX(confinementRect),
392 anchorPoint.y - NSMinY(confinementRect)); 392 anchorPoint.y - NSMinY(confinementRect));
393 return confinementRect; 393 return confinementRect;
394 } 394 }
395 395
396 @end 396 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698