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_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ |
7 | 7 |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "content/public/common/page_transition_types.h" | 9 #include "content/public/common/page_transition_types.h" |
10 #include "webkit/glue/window_open_disposition.h" | 10 #include "webkit/glue/window_open_disposition.h" |
11 | 11 |
12 class GURL; | 12 class GURL; |
13 class InstantController; | 13 class InstantController; |
14 class SkBitmap; | |
15 class TabContents; | 14 class TabContents; |
16 | 15 |
| 16 namespace gfx { |
| 17 class Image; |
| 18 } |
| 19 |
17 // I am in hack-and-slash mode right now. | 20 // I am in hack-and-slash mode right now. |
18 // http://code.google.com/p/chromium/issues/detail?id=6772 | 21 // http://code.google.com/p/chromium/issues/detail?id=6772 |
19 | 22 |
20 // Embedders of an AutocompleteEdit widget must implement this class. | 23 // Embedders of an AutocompleteEdit widget must implement this class. |
21 class OmniboxEditController { | 24 class OmniboxEditController { |
22 public: | 25 public: |
23 // When the user presses enter or selects a line with the mouse, this | 26 // When the user presses enter or selects a line with the mouse, this |
24 // function will get called synchronously with the url to open and | 27 // function will get called synchronously with the url to open and |
25 // disposition and transition to use when opening it. | 28 // disposition and transition to use when opening it. |
26 // | 29 // |
(...skipping 18 matching lines...) Expand all Loading... |
45 // the edit is guaranteed to be showing the permanent text. | 48 // the edit is guaranteed to be showing the permanent text. |
46 virtual void OnInputInProgress(bool in_progress) = 0; | 49 virtual void OnInputInProgress(bool in_progress) = 0; |
47 | 50 |
48 // Called whenever the autocomplete edit is losing focus. | 51 // Called whenever the autocomplete edit is losing focus. |
49 virtual void OnKillFocus() = 0; | 52 virtual void OnKillFocus() = 0; |
50 | 53 |
51 // Called whenever the autocomplete edit gets focused. | 54 // Called whenever the autocomplete edit gets focused. |
52 virtual void OnSetFocus() = 0; | 55 virtual void OnSetFocus() = 0; |
53 | 56 |
54 // Returns the favicon of the current page. | 57 // Returns the favicon of the current page. |
55 virtual SkBitmap GetFavicon() const = 0; | 58 virtual gfx::Image GetFavicon() const = 0; |
56 | 59 |
57 // Returns the title of the current page. | 60 // Returns the title of the current page. |
58 virtual string16 GetTitle() const = 0; | 61 virtual string16 GetTitle() const = 0; |
59 | 62 |
60 // Returns the InstantController, or NULL if instant is not enabled. | 63 // Returns the InstantController, or NULL if instant is not enabled. |
61 virtual InstantController* GetInstant() = 0; | 64 virtual InstantController* GetInstant() = 0; |
62 | 65 |
63 // Returns the TabContents of the currently active tab. | 66 // Returns the TabContents of the currently active tab. |
64 virtual TabContents* GetTabContents() const = 0; | 67 virtual TabContents* GetTabContents() const = 0; |
65 | 68 |
66 protected: | 69 protected: |
67 virtual ~OmniboxEditController() {} | 70 virtual ~OmniboxEditController() {} |
68 }; | 71 }; |
69 | 72 |
70 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ | 73 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ |
OLD | NEW |