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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h

Issue 2700243002: [Mac] Test for Security State Bubble Decoration (Closed)
Patch Set: Nits Created 3 years, 10 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 (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 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
17 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" 17 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
18 #include "chrome/browser/ui/location_bar/location_bar.h" 18 #include "chrome/browser/ui/location_bar/location_bar.h"
19 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h" 19 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h"
20 #include "components/content_settings/core/common/content_settings_types.h" 20 #include "components/content_settings/core/common/content_settings_types.h"
21 #include "components/prefs/pref_member.h" 21 #include "components/prefs/pref_member.h"
22 #include "components/security_state/core/security_state.h" 22 #include "components/security_state/core/security_state.h"
23 #include "components/zoom/zoom_event_manager_observer.h" 23 #include "components/zoom/zoom_event_manager_observer.h"
24 24
25 @class AutocompleteTextField; 25 @class AutocompleteTextField;
26 class CommandUpdater; 26 class CommandUpdater;
27 class ContentSettingDecoration; 27 class ContentSettingDecoration;
28 class KeywordHintDecoration; 28 class KeywordHintDecoration;
29 class LocationBarDecoration; 29 class LocationBarDecoration;
30 class LocationBarViewMacTest;
30 class LocationIconDecoration; 31 class LocationIconDecoration;
31 class ManagePasswordsDecoration; 32 class ManagePasswordsDecoration;
32 class PageActionDecoration; 33 class PageActionDecoration;
33 class Profile; 34 class Profile;
34 class SaveCreditCardDecoration; 35 class SaveCreditCardDecoration;
35 class SelectedKeywordDecoration; 36 class SelectedKeywordDecoration;
36 class StarDecoration; 37 class StarDecoration;
37 class TranslateDecoration; 38 class TranslateDecoration;
38 class SecurityStateBubbleDecoration; 39 class SecurityStateBubbleDecoration;
39 class ZoomDecoration; 40 class ZoomDecoration;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // ZoomManagerObserver: 216 // ZoomManagerObserver:
216 // Updates the view for the zoom icon when default zoom levels change. 217 // Updates the view for the zoom icon when default zoom levels change.
217 void OnDefaultZoomLevelChanged() override; 218 void OnDefaultZoomLevelChanged() override;
218 219
219 // Returns the decoration accessibility views for all of this 220 // Returns the decoration accessibility views for all of this
220 // LocationBarViewMac's decorations. The returned NSViews may not have been 221 // LocationBarViewMac's decorations. The returned NSViews may not have been
221 // positioned yet. 222 // positioned yet.
222 std::vector<NSView*> GetDecorationAccessibilityViews(); 223 std::vector<NSView*> GetDecorationAccessibilityViews();
223 224
224 private: 225 private:
226 friend class LocationBarViewMacTest;
225 friend ZoomDecorationTest; 227 friend ZoomDecorationTest;
226 228
227 // Posts |notification| to the default notification center. 229 // Posts |notification| to the default notification center.
228 void PostNotification(NSString* notification); 230 void PostNotification(NSString* notification);
229 231
230 // Return the decoration for |page_action|. 232 // Return the decoration for |page_action|.
231 PageActionDecoration* GetPageActionDecoration(ExtensionAction* page_action); 233 PageActionDecoration* GetPageActionDecoration(ExtensionAction* page_action);
232 234
233 // Clear the page-action decorations. 235 // Clear the page-action decorations.
234 void DeletePageActionDecorations(); 236 void DeletePageActionDecorations();
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 // The security level of the location bar icon. 334 // The security level of the location bar icon.
333 security_state::SecurityLevel security_level_; 335 security_state::SecurityLevel security_level_;
334 336
335 // Used to schedule a task for the first run info bubble. 337 // Used to schedule a task for the first run info bubble.
336 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; 338 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_;
337 339
338 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); 340 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac);
339 }; 341 };
340 342
341 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ 343 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698