| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // is called and this function returns |NSZeroPoint|. | 119 // is called and this function returns |NSZeroPoint|. |
| 120 NSPoint GetPageActionBubblePoint(ExtensionAction* page_action); | 120 NSPoint GetPageActionBubblePoint(ExtensionAction* page_action); |
| 121 | 121 |
| 122 // Get the blocked-popup content setting's frame in window | 122 // Get the blocked-popup content setting's frame in window |
| 123 // coordinates. Used by the blocked-popup animation. Returns | 123 // coordinates. Used by the blocked-popup animation. Returns |
| 124 // |NSZeroRect| if the relevant content setting decoration is not | 124 // |NSZeroRect| if the relevant content setting decoration is not |
| 125 // visible. | 125 // visible. |
| 126 NSRect GetBlockedPopupRect() const; | 126 NSRect GetBlockedPopupRect() const; |
| 127 | 127 |
| 128 // AutocompleteEditController implementation. | 128 // AutocompleteEditController implementation. |
| 129 virtual void OnAutocompleteAccept(const GURL& url, | 129 virtual void OnAutocompleteAccept( |
| 130 const GURL& url, |
| 130 WindowOpenDisposition disposition, | 131 WindowOpenDisposition disposition, |
| 131 content::PageTransition transition, | 132 content::PageTransition transition, |
| 132 const GURL& alternate_nav_url); | 133 const GURL& alternate_nav_url) OVERRIDE; |
| 133 virtual void OnChanged(); | 134 virtual void OnChanged() OVERRIDE; |
| 134 virtual void OnSelectionBoundsChanged(); | 135 virtual void OnSelectionBoundsChanged() OVERRIDE; |
| 135 virtual void OnInputInProgress(bool in_progress); | 136 virtual void OnInputInProgress(bool in_progress) OVERRIDE; |
| 136 virtual void OnKillFocus(); | 137 virtual void OnKillFocus() OVERRIDE; |
| 137 virtual void OnSetFocus(); | 138 virtual void OnSetFocus() OVERRIDE; |
| 138 virtual SkBitmap GetFavicon() const; | 139 virtual SkBitmap GetFavicon() const OVERRIDE; |
| 139 virtual string16 GetTitle() const; | 140 virtual string16 GetTitle() const OVERRIDE; |
| 140 virtual InstantController* GetInstant(); | 141 virtual InstantController* GetInstant() OVERRIDE; |
| 141 virtual TabContentsWrapper* GetTabContentsWrapper() const; | 142 virtual TabContentsWrapper* GetTabContentsWrapper() const OVERRIDE; |
| 142 | 143 |
| 143 NSImage* GetKeywordImage(const string16& keyword); | 144 NSImage* GetKeywordImage(const string16& keyword); |
| 144 | 145 |
| 145 AutocompleteTextField* GetAutocompleteTextField() { return field_; } | 146 AutocompleteTextField* GetAutocompleteTextField() { return field_; } |
| 146 | 147 |
| 147 | 148 |
| 148 // Overridden from NotificationObserver. | 149 // Overridden from NotificationObserver. |
| 149 virtual void Observe(int type, | 150 virtual void Observe(int type, |
| 150 const content::NotificationSource& source, | 151 const content::NotificationSource& source, |
| 151 const content::NotificationDetails& details); | 152 const content::NotificationDetails& details) OVERRIDE; |
| 152 | 153 |
| 153 private: | 154 private: |
| 154 // Posts |notification| to the default notification center. | 155 // Posts |notification| to the default notification center. |
| 155 void PostNotification(NSString* notification); | 156 void PostNotification(NSString* notification); |
| 156 | 157 |
| 157 // Return the decoration for |page_action|. | 158 // Return the decoration for |page_action|. |
| 158 PageActionDecoration* GetPageActionDecoration(ExtensionAction* page_action); | 159 PageActionDecoration* GetPageActionDecoration(ExtensionAction* page_action); |
| 159 | 160 |
| 160 // Clear the page-action decorations. | 161 // Clear the page-action decorations. |
| 161 void DeletePageActionDecorations(); | 162 void DeletePageActionDecorations(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 // Used to schedule a task for the first run info bubble. | 225 // Used to schedule a task for the first run info bubble. |
| 225 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; | 226 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; |
| 226 | 227 |
| 227 // Used to change the visibility of the star decoration. | 228 // Used to change the visibility of the star decoration. |
| 228 BooleanPrefMember edit_bookmarks_enabled_; | 229 BooleanPrefMember edit_bookmarks_enabled_; |
| 229 | 230 |
| 230 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); | 231 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); |
| 231 }; | 232 }; |
| 232 | 233 |
| 233 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ | 234 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ |
| OLD | NEW |