OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SEARCH_INSTANT_IPC_SENDER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_IPC_SENDER_H_ |
6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_IPC_SENDER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_IPC_SENDER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/common/instant_types.h" | |
10 #include "chrome/common/omnibox_focus_state.h" | 9 #include "chrome/common/omnibox_focus_state.h" |
11 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
12 | 11 |
13 namespace gfx { | 12 namespace gfx { |
14 class Rect; | 13 class Rect; |
15 } | 14 } |
16 | 15 |
17 namespace IPC { | 16 namespace IPC { |
18 class Sender; | 17 class Sender; |
19 } | 18 } |
(...skipping 12 matching lines...) Expand all Loading... |
32 // Tells the page that the user pressed Enter in the omnibox. | 31 // Tells the page that the user pressed Enter in the omnibox. |
33 virtual void Submit(const string16& text) {} | 32 virtual void Submit(const string16& text) {} |
34 | 33 |
35 // Tells the page the left and right margins of the omnibox. This is used by | 34 // Tells the page the left and right margins of the omnibox. This is used by |
36 // the page to align text or assets properly with the omnibox. | 35 // the page to align text or assets properly with the omnibox. |
37 virtual void SetOmniboxBounds(const gfx::Rect& bounds) {} | 36 virtual void SetOmniboxBounds(const gfx::Rect& bounds) {} |
38 | 37 |
39 // Tells the page information it needs to display promos. | 38 // Tells the page information it needs to display promos. |
40 virtual void SetPromoInformation(bool is_app_launcher_enabled) {} | 39 virtual void SetPromoInformation(bool is_app_launcher_enabled) {} |
41 | 40 |
42 // Tells the page the suggestion to be prefetched if any. | |
43 virtual void SetSuggestionToPrefetch(const InstantSuggestion& suggestion) {} | |
44 | |
45 // Tells the page that the omnibox focus has changed. | 41 // Tells the page that the omnibox focus has changed. |
46 virtual void FocusChanged(OmniboxFocusState state, | 42 virtual void FocusChanged(OmniboxFocusState state, |
47 OmniboxFocusChangeReason reason) {} | 43 OmniboxFocusChangeReason reason) {} |
48 | 44 |
49 // Tells the page that user input started or stopped. | 45 // Tells the page that user input started or stopped. |
50 virtual void SetInputInProgress(bool input_in_progress) {} | 46 virtual void SetInputInProgress(bool input_in_progress) {} |
51 | 47 |
52 // Tells the page to toggle voice search. | 48 // Tells the page to toggle voice search. |
53 virtual void ToggleVoiceSearch() {} | 49 virtual void ToggleVoiceSearch() {} |
54 | 50 |
55 protected: | 51 protected: |
56 InstantIPCSender() {} | 52 InstantIPCSender() {} |
57 | 53 |
58 private: | 54 private: |
59 DISALLOW_COPY_AND_ASSIGN(InstantIPCSender); | 55 DISALLOW_COPY_AND_ASSIGN(InstantIPCSender); |
60 }; | 56 }; |
61 | 57 |
62 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_IPC_SENDER_H_ | 58 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_IPC_SENDER_H_ |
OLD | NEW |