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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
| 7 #include <memory> |
| 8 |
7 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 11 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
11 #include "chrome/browser/ui/website_settings/website_settings_ui.h" | 12 #include "chrome/browser/ui/website_settings/website_settings_ui.h" |
12 #include "components/security_state/security_state_model.h" | 13 #include "components/security_state/security_state_model.h" |
13 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
14 | 15 |
15 class WebsiteSettingsUIBridge; | 16 class WebsiteSettingsUIBridge; |
16 | 17 |
17 namespace content { | 18 namespace content { |
18 class WebContents; | 19 class WebContents; |
19 } | 20 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 NSView* permissionsView_; | 67 NSView* permissionsView_; |
67 | 68 |
68 // Whether the permissionView_ shows anything. | 69 // Whether the permissionView_ shows anything. |
69 BOOL permissionsPresent_; | 70 BOOL permissionsPresent_; |
70 | 71 |
71 // The link button for showing site settings. | 72 // The link button for showing site settings. |
72 NSButton* siteSettingsButton_; | 73 NSButton* siteSettingsButton_; |
73 | 74 |
74 // The UI translates user actions to specific events and forwards them to the | 75 // The UI translates user actions to specific events and forwards them to the |
75 // |presenter_|. The |presenter_| handles these events and updates the UI. | 76 // |presenter_|. The |presenter_| handles these events and updates the UI. |
76 scoped_ptr<WebsiteSettings> presenter_; | 77 std::unique_ptr<WebsiteSettings> presenter_; |
77 | 78 |
78 // Bridge which implements the WebsiteSettingsUI interface and forwards | 79 // Bridge which implements the WebsiteSettingsUI interface and forwards |
79 // methods on to this class. | 80 // methods on to this class. |
80 scoped_ptr<WebsiteSettingsUIBridge> bridge_; | 81 std::unique_ptr<WebsiteSettingsUIBridge> bridge_; |
81 } | 82 } |
82 | 83 |
83 // Designated initializer. The controller will release itself when the bubble | 84 // Designated initializer. The controller will release itself when the bubble |
84 // is closed. |parentWindow| cannot be nil. |webContents| may be nil for | 85 // is closed. |parentWindow| cannot be nil. |webContents| may be nil for |
85 // testing purposes. | 86 // testing purposes. |
86 - (id)initWithParentWindow:(NSWindow*)parentWindow | 87 - (id)initWithParentWindow:(NSWindow*)parentWindow |
87 websiteSettingsUIBridge:(WebsiteSettingsUIBridge*)bridge | 88 websiteSettingsUIBridge:(WebsiteSettingsUIBridge*)bridge |
88 webContents:(content::WebContents*)webContents | 89 webContents:(content::WebContents*)webContents |
89 isInternalPage:(BOOL)isInternalPage | 90 isInternalPage:(BOOL)isInternalPage |
90 isDevToolsDisabled:(BOOL)isDevToolsDisabled; | 91 isDevToolsDisabled:(BOOL)isDevToolsDisabled; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 134 |
134 private: | 135 private: |
135 // The WebContents the bubble UI is attached to. | 136 // The WebContents the bubble UI is attached to. |
136 content::WebContents* web_contents_; | 137 content::WebContents* web_contents_; |
137 | 138 |
138 // The Cocoa controller for the bubble UI. | 139 // The Cocoa controller for the bubble UI. |
139 WebsiteSettingsBubbleController* bubble_controller_; | 140 WebsiteSettingsBubbleController* bubble_controller_; |
140 | 141 |
141 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge); | 142 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge); |
142 }; | 143 }; |
OLD | NEW |