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 #include "chrome/browser/ui/search/instant_ipc_sender.h" | 5 #include "chrome/browser/ui/search/instant_ipc_sender.h" |
6 | 6 |
7 #include "chrome/common/render_messages.h" | 7 #include "chrome/common/render_messages.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 virtual void SetOmniboxBounds(const gfx::Rect& bounds) OVERRIDE { | 22 virtual void SetOmniboxBounds(const gfx::Rect& bounds) OVERRIDE { |
23 Send(new ChromeViewMsg_SearchBoxMarginChange( | 23 Send(new ChromeViewMsg_SearchBoxMarginChange( |
24 routing_id(), bounds.x(), bounds.width())); | 24 routing_id(), bounds.x(), bounds.width())); |
25 } | 25 } |
26 | 26 |
27 virtual void SetPromoInformation(bool is_app_launcher_enabled) OVERRIDE { | 27 virtual void SetPromoInformation(bool is_app_launcher_enabled) OVERRIDE { |
28 Send(new ChromeViewMsg_SearchBoxPromoInformation( | 28 Send(new ChromeViewMsg_SearchBoxPromoInformation( |
29 routing_id(), is_app_launcher_enabled)); | 29 routing_id(), is_app_launcher_enabled)); |
30 } | 30 } |
31 | 31 |
32 virtual void SetSuggestionToPrefetch( | |
33 const InstantSuggestion& suggestion) OVERRIDE { | |
34 Send(new ChromeViewMsg_SearchBoxSetSuggestionToPrefetch(routing_id(), | |
35 suggestion)); | |
36 } | |
37 | |
38 virtual void FocusChanged(OmniboxFocusState state, | 32 virtual void FocusChanged(OmniboxFocusState state, |
39 OmniboxFocusChangeReason reason) OVERRIDE { | 33 OmniboxFocusChangeReason reason) OVERRIDE { |
40 Send(new ChromeViewMsg_SearchBoxFocusChanged(routing_id(), state, reason)); | 34 Send(new ChromeViewMsg_SearchBoxFocusChanged(routing_id(), state, reason)); |
41 } | 35 } |
42 | 36 |
43 virtual void SetInputInProgress(bool input_in_progress) OVERRIDE { | 37 virtual void SetInputInProgress(bool input_in_progress) OVERRIDE { |
44 Send(new ChromeViewMsg_SearchBoxSetInputInProgress( | 38 Send(new ChromeViewMsg_SearchBoxSetInputInProgress( |
45 routing_id(), input_in_progress)); | 39 routing_id(), input_in_progress)); |
46 } | 40 } |
47 | 41 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 scoped_ptr<InstantIPCSender> sender( | 76 scoped_ptr<InstantIPCSender> sender( |
83 is_incognito ? | 77 is_incognito ? |
84 static_cast<InstantIPCSender*>(new IncognitoInstantIPCSenderImpl()) : | 78 static_cast<InstantIPCSender*>(new IncognitoInstantIPCSenderImpl()) : |
85 static_cast<InstantIPCSender*>(new InstantIPCSenderImpl())); | 79 static_cast<InstantIPCSender*>(new InstantIPCSenderImpl())); |
86 return sender.Pass(); | 80 return sender.Pass(); |
87 } | 81 } |
88 | 82 |
89 void InstantIPCSender::SetContents(content::WebContents* web_contents) { | 83 void InstantIPCSender::SetContents(content::WebContents* web_contents) { |
90 Observe(web_contents); | 84 Observe(web_contents); |
91 } | 85 } |
OLD | NEW |