| 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 #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 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 class PageActionDecoration; | 32 class PageActionDecoration; |
| 33 class Profile; | 33 class Profile; |
| 34 class SaveCreditCardDecoration; | 34 class SaveCreditCardDecoration; |
| 35 class SelectedKeywordDecoration; | 35 class SelectedKeywordDecoration; |
| 36 class StarDecoration; | 36 class StarDecoration; |
| 37 class TranslateDecoration; | 37 class TranslateDecoration; |
| 38 class SecurityStateBubbleDecoration; | 38 class SecurityStateBubbleDecoration; |
| 39 class ZoomDecoration; | 39 class ZoomDecoration; |
| 40 class ZoomDecorationTest; | 40 class ZoomDecorationTest; |
| 41 | 41 |
| 42 namespace { |
| 43 class LocationBarViewMacTest; |
| 44 } |
| 45 |
| 42 // A C++ bridge class that represents the location bar UI element to | 46 // A C++ bridge class that represents the location bar UI element to |
| 43 // the portable code. Wires up an OmniboxViewMac instance to | 47 // the portable code. Wires up an OmniboxViewMac instance to |
| 44 // the location bar text field, which handles most of the work. | 48 // the location bar text field, which handles most of the work. |
| 45 | 49 |
| 46 class LocationBarViewMac : public LocationBar, | 50 class LocationBarViewMac : public LocationBar, |
| 47 public LocationBarTesting, | 51 public LocationBarTesting, |
| 48 public ChromeOmniboxEditController, | 52 public ChromeOmniboxEditController, |
| 49 public zoom::ZoomEventManagerObserver { | 53 public zoom::ZoomEventManagerObserver { |
| 50 public: | 54 public: |
| 51 LocationBarViewMac(AutocompleteTextField* field, | 55 LocationBarViewMac(AutocompleteTextField* field, |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // ZoomManagerObserver: | 219 // ZoomManagerObserver: |
| 216 // Updates the view for the zoom icon when default zoom levels change. | 220 // Updates the view for the zoom icon when default zoom levels change. |
| 217 void OnDefaultZoomLevelChanged() override; | 221 void OnDefaultZoomLevelChanged() override; |
| 218 | 222 |
| 219 // Returns the decoration accessibility views for all of this | 223 // Returns the decoration accessibility views for all of this |
| 220 // LocationBarViewMac's decorations. The returned NSViews may not have been | 224 // LocationBarViewMac's decorations. The returned NSViews may not have been |
| 221 // positioned yet. | 225 // positioned yet. |
| 222 std::vector<NSView*> GetDecorationAccessibilityViews(); | 226 std::vector<NSView*> GetDecorationAccessibilityViews(); |
| 223 | 227 |
| 224 private: | 228 private: |
| 229 friend class LocationBarViewMacTest; |
| 225 friend ZoomDecorationTest; | 230 friend ZoomDecorationTest; |
| 226 | 231 |
| 227 // Posts |notification| to the default notification center. | 232 // Posts |notification| to the default notification center. |
| 228 void PostNotification(NSString* notification); | 233 void PostNotification(NSString* notification); |
| 229 | 234 |
| 230 // Return the decoration for |page_action|. | 235 // Return the decoration for |page_action|. |
| 231 PageActionDecoration* GetPageActionDecoration(ExtensionAction* page_action); | 236 PageActionDecoration* GetPageActionDecoration(ExtensionAction* page_action); |
| 232 | 237 |
| 233 // Clear the page-action decorations. | 238 // Clear the page-action decorations. |
| 234 void DeletePageActionDecorations(); | 239 void DeletePageActionDecorations(); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 // The security level of the location bar icon. | 337 // The security level of the location bar icon. |
| 333 security_state::SecurityLevel security_level_; | 338 security_state::SecurityLevel security_level_; |
| 334 | 339 |
| 335 // Used to schedule a task for the first run info bubble. | 340 // Used to schedule a task for the first run info bubble. |
| 336 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; | 341 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; |
| 337 | 342 |
| 338 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); | 343 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); |
| 339 }; | 344 }; |
| 340 | 345 |
| 341 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ | 346 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ |
| OLD | NEW |