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_OMNIBOX_OMNIBOX_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ |
6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 virtual void OnFrameChanged() OVERRIDE; | 79 virtual void OnFrameChanged() OVERRIDE; |
80 virtual void ClosePopup() OVERRIDE; | 80 virtual void ClosePopup() OVERRIDE; |
81 virtual void OnDidBeginEditing() OVERRIDE; | 81 virtual void OnDidBeginEditing() OVERRIDE; |
82 virtual void OnBeforeChange() OVERRIDE; | 82 virtual void OnBeforeChange() OVERRIDE; |
83 virtual void OnDidChange() OVERRIDE; | 83 virtual void OnDidChange() OVERRIDE; |
84 virtual void OnDidEndEditing() OVERRIDE; | 84 virtual void OnDidEndEditing() OVERRIDE; |
85 virtual bool OnDoCommandBySelector(SEL cmd) OVERRIDE; | 85 virtual bool OnDoCommandBySelector(SEL cmd) OVERRIDE; |
86 virtual void OnSetFocus(bool control_down) OVERRIDE; | 86 virtual void OnSetFocus(bool control_down) OVERRIDE; |
87 virtual void OnKillFocus() OVERRIDE; | 87 virtual void OnKillFocus() OVERRIDE; |
88 virtual void OnMouseDown(NSInteger button_number) OVERRIDE; | 88 virtual void OnMouseDown(NSInteger button_number) OVERRIDE; |
| 89 virtual bool ShouldSelectAllOnMouseDown() OVERRIDE; |
89 | 90 |
90 // Helper for LocationBarViewMac. Optionally selects all in |field_|. | 91 // Helper for LocationBarViewMac. Optionally selects all in |field_|. |
91 void FocusLocation(bool select_all); | 92 void FocusLocation(bool select_all); |
92 | 93 |
93 // Helper to get the font to use in the field, exposed for the | 94 // Helper to get the font to use in the field, exposed for the |
94 // popup. | 95 // popup. |
95 static NSFont* GetFieldFont(); | 96 static NSFont* GetFieldFont(); |
96 | 97 |
97 // If |resource_id| has a PDF image which can be used, return it. | 98 // If |resource_id| has a PDF image which can be used, return it. |
98 // Otherwise return the PNG image from the resource bundle. | 99 // Otherwise return the PNG image from the resource bundle. |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 177 |
177 // Was the delete key pressed with an empty selection at the end of the edit? | 178 // Was the delete key pressed with an empty selection at the end of the edit? |
178 bool delete_at_end_pressed_; | 179 bool delete_at_end_pressed_; |
179 | 180 |
180 string16 suggest_text_; | 181 string16 suggest_text_; |
181 | 182 |
182 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); | 183 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); |
183 }; | 184 }; |
184 | 185 |
185 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ | 186 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ |
OLD | NEW |