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

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

Issue 1917013002: Use a different string and icon for chrome-extension pages in Page Info Bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build Created 4 years, 7 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 // 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
76 // |presenter_|. The |presenter_| handles these events and updates the UI. 76 // |presenter_|. The |presenter_| handles these events and updates the UI.
77 std::unique_ptr<WebsiteSettings> presenter_; 77 std::unique_ptr<WebsiteSettings> presenter_;
78 78
79 // Bridge which implements the WebsiteSettingsUI interface and forwards 79 // Bridge which implements the WebsiteSettingsUI interface and forwards
80 // methods on to this class. 80 // methods on to this class.
81 std::unique_ptr<WebsiteSettingsUIBridge> bridge_; 81 std::unique_ptr<WebsiteSettingsUIBridge> bridge_;
82 } 82 }
83 83
84 enum BubbleType {
85 WEB_PAGE, // Bubble for web URLs
86 INTERNAL_PAGE, // For chrome: URLs
87 EXTENSION_PAGE, // For chrome-extension: URLs
88 };
89
84 // Designated initializer. The controller will release itself when the bubble 90 // Designated initializer. The controller will release itself when the bubble
85 // is closed. |parentWindow| cannot be nil. |webContents| may be nil for 91 // is closed. |parentWindow| cannot be nil. |webContents| may be nil for
86 // testing purposes. 92 // testing purposes.
87 - (id)initWithParentWindow:(NSWindow*)parentWindow 93 - (id)initWithParentWindow:(NSWindow*)parentWindow
88 websiteSettingsUIBridge:(WebsiteSettingsUIBridge*)bridge 94 websiteSettingsUIBridge:(WebsiteSettingsUIBridge*)bridge
89 webContents:(content::WebContents*)webContents 95 webContents:(content::WebContents*)webContents
90 isInternalPage:(BOOL)isInternalPage 96 bubbleType:(BubbleType)bubbleType
91 isDevToolsDisabled:(BOOL)isDevToolsDisabled; 97 isDevToolsDisabled:(BOOL)isDevToolsDisabled;
92 98
93 // Return the default width of the window. It may be wider to fit the content. 99 // Return the default width of the window. It may be wider to fit the content.
94 // This may be overriden by a subclass for testing purposes. 100 // This may be overriden by a subclass for testing purposes.
95 - (CGFloat)defaultWindowWidth; 101 - (CGFloat)defaultWindowWidth;
96 102
97 @end 103 @end
98 104
99 // Provides a bridge between the WebSettingsUI C++ interface and the Cocoa 105 // Provides a bridge between the WebSettingsUI C++ interface and the Cocoa
100 // implementation in WebsiteSettingsBubbleController. 106 // implementation in WebsiteSettingsBubbleController.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 140
135 private: 141 private:
136 // The WebContents the bubble UI is attached to. 142 // The WebContents the bubble UI is attached to.
137 content::WebContents* web_contents_; 143 content::WebContents* web_contents_;
138 144
139 // The Cocoa controller for the bubble UI. 145 // The Cocoa controller for the bubble UI.
140 WebsiteSettingsBubbleController* bubble_controller_; 146 WebsiteSettingsBubbleController* bubble_controller_;
141 147
142 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge); 148 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge);
143 }; 149 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698