OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/cocoa/website_settings/split_block_button.h" | 5 #import "chrome/browser/ui/cocoa/website_settings/split_block_button.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "grit/generated_resources.h" |
11 #include "skia/ext/skia_utils_mac.h" | 12 #include "skia/ext/skia_utils_mac.h" |
12 #import "ui/base/cocoa/menu_controller.h" | 13 #import "ui/base/cocoa/menu_controller.h" |
13 #include "ui/base/l10n/l10n_util_mac.h" | 14 #include "ui/base/l10n/l10n_util_mac.h" |
14 #include "ui/base/models/simple_menu_model.h" | 15 #include "ui/base/models/simple_menu_model.h" |
15 | 16 |
16 namespace { | 17 namespace { |
17 | 18 |
18 enum MouseLocation { | 19 enum MouseLocation { |
19 kInsideLeftCell, | 20 kInsideLeftCell, |
20 kInsideRightCell, | 21 kInsideRightCell, |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 [super drawBorderAndBackgroundWithFrame:NSOffsetRect(frame, -4, 0) | 332 [super drawBorderAndBackgroundWithFrame:NSOffsetRect(frame, -4, 0) |
332 inView:controlView]; | 333 inView:controlView]; |
333 } | 334 } |
334 | 335 |
335 - (NSRect)rect { | 336 - (NSRect)rect { |
336 NSSize size = [self cellSize]; | 337 NSSize size = [self cellSize]; |
337 return NSMakeRect(0, 0, std::ceil(size.width), std::ceil(size.height)); | 338 return NSMakeRect(0, 0, std::ceil(size.width), std::ceil(size.height)); |
338 } | 339 } |
339 | 340 |
340 @end | 341 @end |
OLD | NEW |