OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ |
7 | 7 |
8 #include "chrome/browser/autocomplete/autocomplete.h" | 8 #include "chrome/browser/autocomplete/autocomplete.h" |
9 #include "chrome/common/notification_registrar.h" | 9 #include "chrome/common/notification_registrar.h" |
10 #include "chrome/common/page_transition_types.h" | 10 #include "chrome/common/page_transition_types.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // Called when anything has changed that might affect the layout or contents | 40 // Called when anything has changed that might affect the layout or contents |
41 // of the views around the edit, including the text of the edit and the | 41 // of the views around the edit, including the text of the edit and the |
42 // status of any keyword- or hint-related state. | 42 // status of any keyword- or hint-related state. |
43 virtual void OnChanged() = 0; | 43 virtual void OnChanged() = 0; |
44 | 44 |
45 // Called whenever the user starts or stops an input session (typing, | 45 // Called whenever the user starts or stops an input session (typing, |
46 // interacting with the edit, etc.). When user input is not in progress, | 46 // interacting with the edit, etc.). When user input is not in progress, |
47 // the edit is guaranteed to be showing the permanent text. | 47 // the edit is guaranteed to be showing the permanent text. |
48 virtual void OnInputInProgress(bool in_progress) = 0; | 48 virtual void OnInputInProgress(bool in_progress) = 0; |
49 | 49 |
| 50 // Called whenever the autocomplete edit gets focused. |
| 51 virtual void OnSetFocus() = 0; |
| 52 |
50 // Returns the favicon of the current page. | 53 // Returns the favicon of the current page. |
51 virtual SkBitmap GetFavIcon() const = 0; | 54 virtual SkBitmap GetFavIcon() const = 0; |
52 | 55 |
53 // Returns the title of the current page. | 56 // Returns the title of the current page. |
54 virtual std::wstring GetTitle() const = 0; | 57 virtual std::wstring GetTitle() const = 0; |
55 }; | 58 }; |
56 | 59 |
57 class AutocompleteEditModel : public NotificationObserver { | 60 class AutocompleteEditModel : public NotificationObserver { |
58 public: | 61 public: |
59 enum KeywordUIState { | 62 enum KeywordUIState { |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 mutable GURL paste_and_go_url_; | 446 mutable GURL paste_and_go_url_; |
444 mutable PageTransition::Type paste_and_go_transition_; | 447 mutable PageTransition::Type paste_and_go_transition_; |
445 mutable GURL paste_and_go_alternate_nav_url_; | 448 mutable GURL paste_and_go_alternate_nav_url_; |
446 | 449 |
447 Profile* profile_; | 450 Profile* profile_; |
448 | 451 |
449 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); | 452 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); |
450 }; | 453 }; |
451 | 454 |
452 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ | 455 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ |
OLD | NEW |