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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/permission_selector_button.h

Issue 242443005: Changes cocoa implementation of permission bubble to better match mocks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 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_PERMISSION_SELECTOR_BUTTON_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_WEBSITE_SETTINGS_PERMISSION_SELECTOR_BUTTON_H_
6 #define CHROME_BROWSER_UI_COCOA_WEBSITE_SETTINGS_PERMISSION_SELECTOR_BUTTON_H_ 6 #define CHROME_BROWSER_UI_COCOA_WEBSITE_SETTINGS_PERMISSION_SELECTOR_BUTTON_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/ui/website_settings/permission_menu_model.h" 12 #include "chrome/browser/ui/website_settings/permission_menu_model.h"
13 #include "chrome/common/content_settings.h" 13 #include "chrome/common/content_settings.h"
14 14
15 @class MenuController; 15 @class MenuController;
16 16
17 @interface PermissionSelectorButton : NSPopUpButton { 17 @interface PermissionSelectorButton : NSPopUpButton {
18 @private 18 @private
19 scoped_ptr<PermissionMenuModel> menuModel_; 19 scoped_ptr<PermissionMenuModel> menuModel_;
20 base::scoped_nsobject<MenuController> menuController_; 20 base::scoped_nsobject<MenuController> menuController_;
21 } 21 }
22 22
23 // Designated initializer. 23 // Designated initializer.
24 - (id)initWithPermissionInfo: 24 - (id)initWithPermissionInfo:
25 (const WebsiteSettingsUI::PermissionInfo&)permissionInfo 25 (const WebsiteSettingsUI::PermissionInfo&)permissionInfo
26 forURL:(const GURL&)url 26 forURL:(const GURL&)url
27 withCallback:(PermissionMenuModel::ChangeCallback)callback; 27 withCallback:(PermissionMenuModel::ChangeCallback)callback;
28 28
29 // Returns the size of the button with the given title. 29 // Returns the best size for |button| with the given title.
30 - (NSSize)sizeForTitle:(NSString*)title; 30 + (NSSize)sizeForTitle:(NSString*)title forButton:(NSButton*)button;
31 31
32 // Returns the largest possible size given all of the items in the menu. 32 // Returns the largest possible size given all of the items in the menu.
33 - (CGFloat)maxTitleWidthWithDefaultSetting:(ContentSetting)defaultSetting; 33 - (CGFloat)maxTitleWidthWithDefaultSetting:(ContentSetting)defaultSetting;
34 34
35 @end 35 @end
36 36
37 #endif // CHROME_BROWSER_UI_COCOA_WEBSITE_SETTINGS_PERMISSION_SELECTOR_BUTTON_H _ 37 #endif // CHROME_BROWSER_UI_COCOA_WEBSITE_SETTINGS_PERMISSION_SELECTOR_BUTTON_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698