OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "base/memory/scoped_nsobject.h" | 7 #include "base/memory/scoped_nsobject.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 9 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
10 #include "chrome/browser/ui/website_settings/website_settings_ui.h" | 10 #include "chrome/browser/ui/website_settings/website_settings_ui.h" |
11 | 11 |
12 class TabContents; | 12 class TabContents; |
13 class WebsiteSettingsUIBridge; | 13 class WebsiteSettingsUIBridge; |
14 | 14 |
15 // This NSWindowController subclass manages the InfoBubbleWindow and view that | 15 // This NSWindowController subclass manages the InfoBubbleWindow and view that |
16 // are displayed when the user clicks the favicon or security lock icon. | 16 // are displayed when the user clicks the favicon or security lock icon. |
17 @interface WebsiteSettingsBubbleController : BaseBubbleController { | 17 @interface WebsiteSettingsBubbleController : BaseBubbleController { |
18 @private | 18 @private |
19 scoped_nsobject<NSView> contentView_; | 19 scoped_nsobject<NSView> contentView_; |
20 scoped_nsobject<NSSegmentedControl> segmentedControl_; | 20 scoped_nsobject<NSSegmentedControl> segmentedControl_; |
21 scoped_nsobject<NSTabView> tabView_; | 21 scoped_nsobject<NSTabView> tabView_; |
22 | 22 |
23 // Displays the web site identity. | 23 // Displays the web site identity. |
24 NSTextField* identityField_; | 24 NSTextField* identityField_; |
25 | 25 |
26 // Display the identity status (e.g. verified, not verified). | 26 // Display the identity status (e.g. verified, not verified). |
27 NSTextField* identityStatusField_; | 27 NSTextField* identityStatusField_; |
28 | 28 |
29 NSView* permissionsContentView_; | 29 // The main content view for the Permissions tab. |
| 30 NSView* permissionsTabContentView_; |
| 31 |
| 32 // Container for cookies info on the Permissions tab. |
| 33 NSView* cookiesView_; |
| 34 |
| 35 // Container for permission info on the Permissions tab. |
| 36 NSView* permissionsView_; |
30 | 37 |
31 NSImageView* identityStatusIcon_; | 38 NSImageView* identityStatusIcon_; |
32 NSTextField* identityStatusDescriptionField_; | 39 NSTextField* identityStatusDescriptionField_; |
33 NSView* separatorAfterIdentity_; | 40 NSView* separatorAfterIdentity_; |
34 | 41 |
35 NSImageView* connectionStatusIcon_; | 42 NSImageView* connectionStatusIcon_; |
36 NSTextField* connectionStatusDescriptionField_; | 43 NSTextField* connectionStatusDescriptionField_; |
37 NSView* separatorAfterConnection_; | 44 NSView* separatorAfterConnection_; |
38 | 45 |
39 NSImageView* firstVisitIcon_; | 46 NSImageView* firstVisitIcon_; |
40 NSTextField* firstVisitHeaderField_; | 47 NSTextField* firstVisitHeaderField_; |
41 NSTextField* firstVisitDescriptionField_; | 48 NSTextField* firstVisitDescriptionField_; |
42 | 49 |
43 CGFloat permissionsTabHeight_; | |
44 | |
45 // The UI translates user actions to specific events and forwards them to the | 50 // The UI translates user actions to specific events and forwards them to the |
46 // |presenter_|. The |presenter_| handles these events and updates the UI. | 51 // |presenter_|. The |presenter_| handles these events and updates the UI. |
47 scoped_ptr<WebsiteSettings> presenter_; | 52 scoped_ptr<WebsiteSettings> presenter_; |
48 | 53 |
49 // Bridge which implements the WebsiteSettingsUI interface and forwards | 54 // Bridge which implements the WebsiteSettingsUI interface and forwards |
50 // methods on to this class. | 55 // methods on to this class. |
51 scoped_ptr<WebsiteSettingsUIBridge> bridge_; | 56 scoped_ptr<WebsiteSettingsUIBridge> bridge_; |
52 } | 57 } |
53 | 58 |
54 // Designated initializer. The controller will release itself when the bubble | 59 // Designated initializer. The controller will release itself when the bubble |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 const PermissionInfoList& permission_info_list) OVERRIDE; | 92 const PermissionInfoList& permission_info_list) OVERRIDE; |
88 virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE; | 93 virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE; |
89 virtual void SetFirstVisit(const string16& first_visit) OVERRIDE; | 94 virtual void SetFirstVisit(const string16& first_visit) OVERRIDE; |
90 | 95 |
91 private: | 96 private: |
92 // The Cocoa controller for the bubble UI. | 97 // The Cocoa controller for the bubble UI. |
93 WebsiteSettingsBubbleController* bubble_controller_; | 98 WebsiteSettingsBubbleController* bubble_controller_; |
94 | 99 |
95 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge); | 100 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge); |
96 }; | 101 }; |
OLD | NEW |