| 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 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| 11 #include <memory> |
| 12 |
| 11 #include "base/macros.h" | 13 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 14 #include "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h" | 15 #include "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h" |
| 15 #include "components/omnibox/browser/omnibox_view.h" | 16 #include "components/omnibox/browser/omnibox_view.h" |
| 16 | 17 |
| 17 class CommandUpdater; | 18 class CommandUpdater; |
| 18 class OmniboxPopupView; | 19 class OmniboxPopupView; |
| 19 class Profile; | 20 class Profile; |
| 20 | 21 |
| 21 namespace content { | 22 namespace content { |
| 22 class WebContents; | 23 class WebContents; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // Return the number of UTF-16 units in the current buffer, excluding the | 187 // Return the number of UTF-16 units in the current buffer, excluding the |
| 187 // suggested text. | 188 // suggested text. |
| 188 int GetOmniboxTextLength() const override; | 189 int GetOmniboxTextLength() const override; |
| 189 NSUInteger GetTextLength() const; | 190 NSUInteger GetTextLength() const; |
| 190 | 191 |
| 191 // Returns true if the caret is at the end of the content. | 192 // Returns true if the caret is at the end of the content. |
| 192 bool IsCaretAtEnd() const; | 193 bool IsCaretAtEnd() const; |
| 193 | 194 |
| 194 Profile* profile_; | 195 Profile* profile_; |
| 195 | 196 |
| 196 scoped_ptr<OmniboxPopupView> popup_view_; | 197 std::unique_ptr<OmniboxPopupView> popup_view_; |
| 197 | 198 |
| 198 AutocompleteTextField* field_; // owned by tab controller | 199 AutocompleteTextField* field_; // owned by tab controller |
| 199 | 200 |
| 200 // Selection at the point where the user started using the | 201 // Selection at the point where the user started using the |
| 201 // arrows to move around in the popup. | 202 // arrows to move around in the popup. |
| 202 NSRange saved_temporary_selection_; | 203 NSRange saved_temporary_selection_; |
| 203 | 204 |
| 204 // Tracking state before and after a possible change for reporting | 205 // Tracking state before and after a possible change for reporting |
| 205 // to model_. | 206 // to model_. |
| 206 NSRange selection_before_change_; | 207 NSRange selection_before_change_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 224 NSRange coalesced_range_update_; | 225 NSRange coalesced_range_update_; |
| 225 | 226 |
| 226 // The time of the first character insert operation that has not yet been | 227 // The time of the first character insert operation that has not yet been |
| 227 // painted. Used to measure omnibox responsiveness with a histogram. | 228 // painted. Used to measure omnibox responsiveness with a histogram. |
| 228 base::TimeTicks insert_char_time_; | 229 base::TimeTicks insert_char_time_; |
| 229 | 230 |
| 230 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); | 231 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); |
| 231 }; | 232 }; |
| 232 | 233 |
| 233 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ | 234 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ |
| OLD | NEW |