OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "chrome/browser/instant/instant_client.h" | 5 #include "chrome/browser/instant/instant_client.h" |
6 | 6 |
7 #include "chrome/common/render_messages.h" | 7 #include "chrome/common/render_messages.h" |
8 #include "content/public/browser/web_contents.h" | 8 #include "content/public/browser/web_contents.h" |
9 | 9 |
10 InstantClient::Delegate::~Delegate() { | 10 InstantClient::Delegate::~Delegate() { |
(...skipping 18 matching lines...) Expand all Loading... |
29 } | 29 } |
30 | 30 |
31 void InstantClient::Submit(const string16& text) { | 31 void InstantClient::Submit(const string16& text) { |
32 Send(new ChromeViewMsg_SearchBoxSubmit(routing_id(), text)); | 32 Send(new ChromeViewMsg_SearchBoxSubmit(routing_id(), text)); |
33 } | 33 } |
34 | 34 |
35 void InstantClient::Cancel(const string16& text) { | 35 void InstantClient::Cancel(const string16& text) { |
36 Send(new ChromeViewMsg_SearchBoxCancel(routing_id(), text)); | 36 Send(new ChromeViewMsg_SearchBoxCancel(routing_id(), text)); |
37 } | 37 } |
38 | 38 |
39 void InstantClient::SetOmniboxBounds(const gfx::Rect& bounds) { | 39 void InstantClient::SetPopupBounds(const gfx::Rect& bounds) { |
40 Send(new ChromeViewMsg_SearchBoxResize(routing_id(), bounds)); | 40 Send(new ChromeViewMsg_SearchBoxPopupResize(routing_id(), bounds)); |
| 41 } |
| 42 |
| 43 void InstantClient::SetMarginSize(const int start, const int end) { |
| 44 Send(new ChromeViewMsg_SearchBoxMarginChange(routing_id(), start, end)); |
41 } | 45 } |
42 | 46 |
43 void InstantClient::DetermineIfPageSupportsInstant() { | 47 void InstantClient::DetermineIfPageSupportsInstant() { |
44 Send(new ChromeViewMsg_DetermineIfPageSupportsInstant(routing_id())); | 48 Send(new ChromeViewMsg_DetermineIfPageSupportsInstant(routing_id())); |
45 } | 49 } |
46 | 50 |
47 void InstantClient::SendAutocompleteResults( | 51 void InstantClient::SendAutocompleteResults( |
48 const std::vector<InstantAutocompleteResult>& results) { | 52 const std::vector<InstantAutocompleteResult>& results) { |
49 Send(new ChromeViewMsg_SearchBoxAutocompleteResults(routing_id(), results)); | 53 Send(new ChromeViewMsg_SearchBoxAutocompleteResults(routing_id(), results)); |
50 } | 54 } |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 143 |
140 void InstantClient::StartCapturingKeyStrokes(int page_id) { | 144 void InstantClient::StartCapturingKeyStrokes(int page_id) { |
141 if (web_contents()->IsActiveEntry(page_id)) | 145 if (web_contents()->IsActiveEntry(page_id)) |
142 delegate_->StartCapturingKeyStrokes(); | 146 delegate_->StartCapturingKeyStrokes(); |
143 } | 147 } |
144 | 148 |
145 void InstantClient::StopCapturingKeyStrokes(int page_id) { | 149 void InstantClient::StopCapturingKeyStrokes(int page_id) { |
146 if (web_contents()->IsActiveEntry(page_id)) | 150 if (web_contents()->IsActiveEntry(page_id)) |
147 delegate_->StopCapturingKeyStrokes(); | 151 delegate_->StopCapturingKeyStrokes(); |
148 } | 152 } |
OLD | NEW |