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 #ifndef CHROME_BROWSER_UI_COCOA_WEBSITE_SETTINGS_SPLIT_BLOCK_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PAGE_INFO_SPLIT_BLOCK_BUTTON_H_ |
6 #define CHROME_BROWSER_UI_COCOA_WEBSITE_SETTINGS_SPLIT_BLOCK_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_COCOA_PAGE_INFO_SPLIT_BLOCK_BUTTON_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h" | 10 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h" |
11 #include "ui/base/models/simple_menu_model.h" | 11 #include "ui/base/models/simple_menu_model.h" |
12 | 12 |
13 @class SplitButtonPopUpCell; | 13 @class SplitButtonPopUpCell; |
14 @class SplitButtonTitleCell; | 14 @class SplitButtonTitleCell; |
15 | 15 |
16 // Block ('deny') button for the permissions bubble. Subclassed from | 16 // Block ('deny') button for the permissions bubble. Subclassed from |
17 // ConstrainedWindowButton, so that it shares styling, but contains two cells | 17 // ConstrainedWindowButton, so that it shares styling, but contains two cells |
18 // instead of just one. The left cell behaves as a normal button, and when | 18 // instead of just one. The left cell behaves as a normal button, and when |
19 // clicked, calls the button's |action| on its |target|. The right cell behaves | 19 // clicked, calls the button's |action| on its |target|. The right cell behaves |
20 // as a NSPopUpButtonCell, and implements a single-item menu. | 20 // as a NSPopUpButtonCell, and implements a single-item menu. |
21 @interface SplitBlockButton : ConstrainedWindowButton { | 21 @interface SplitBlockButton : ConstrainedWindowButton { |
22 @private | 22 @private |
23 base::scoped_nsobject<SplitButtonTitleCell> leftCell_; | 23 base::scoped_nsobject<SplitButtonTitleCell> leftCell_; |
24 base::scoped_nsobject<SplitButtonPopUpCell> rightCell_; | 24 base::scoped_nsobject<SplitButtonPopUpCell> rightCell_; |
25 | 25 |
26 ui::ScopedCrTrackingArea leftTrackingArea_; | 26 ui::ScopedCrTrackingArea leftTrackingArea_; |
27 ui::ScopedCrTrackingArea rightTrackingArea_; | 27 ui::ScopedCrTrackingArea rightTrackingArea_; |
28 } | 28 } |
29 | 29 |
30 // Designated initializer. | 30 // Designated initializer. |
31 - (id)initWithMenuDelegate:(ui::SimpleMenuModel::Delegate*)menuDelegate; | 31 - (id)initWithMenuDelegate:(ui::SimpleMenuModel::Delegate*)menuDelegate; |
32 | 32 |
33 @end | 33 @end |
34 | 34 |
35 #endif // CHROME_BROWSER_UI_COCOA_WEBSITE_SETTINGS_SPLIT_BLOCK_BUTTON_H_ | 35 #endif // CHROME_BROWSER_UI_COCOA_PAGE_INFO_SPLIT_BLOCK_BUTTON_H_ |
OLD | NEW |