| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 void InstantClient::SendThemeAreaHeight(int height) { | 65 void InstantClient::SendThemeAreaHeight(int height) { |
| 66 Send(new ChromeViewMsg_SearchBoxThemeAreaHeightChanged(routing_id(), height)); | 66 Send(new ChromeViewMsg_SearchBoxThemeAreaHeightChanged(routing_id(), height)); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void InstantClient::SetDisplayInstantResults(bool display_instant_results) { | 69 void InstantClient::SetDisplayInstantResults(bool display_instant_results) { |
| 70 Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults(routing_id(), | 70 Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults(routing_id(), |
| 71 display_instant_results)); | 71 display_instant_results)); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void InstantClient::KeyCaptureChanged(bool is_key_capture_enabled) { |
| 75 Send(new ChromeViewMsg_SearchBoxKeyCaptureChanged(routing_id(), |
| 76 is_key_capture_enabled)); |
| 77 } |
| 78 |
| 74 void InstantClient::DidFinishLoad( | 79 void InstantClient::DidFinishLoad( |
| 75 int64 /* frame_id */, | 80 int64 /* frame_id */, |
| 76 const GURL& /* validated_url */, | 81 const GURL& /* validated_url */, |
| 77 bool is_main_frame, | 82 bool is_main_frame, |
| 78 content::RenderViewHost* /* render_view_host */) { | 83 content::RenderViewHost* /* render_view_host */) { |
| 79 if (is_main_frame) | 84 if (is_main_frame) |
| 80 DetermineIfPageSupportsInstant(); | 85 DetermineIfPageSupportsInstant(); |
| 81 } | 86 } |
| 82 | 87 |
| 83 bool InstantClient::OnMessageReceived(const IPC::Message& message) { | 88 bool InstantClient::OnMessageReceived(const IPC::Message& message) { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 139 |
| 135 void InstantClient::StartCapturingKeyStrokes(int page_id) { | 140 void InstantClient::StartCapturingKeyStrokes(int page_id) { |
| 136 if (web_contents()->IsActiveEntry(page_id)) | 141 if (web_contents()->IsActiveEntry(page_id)) |
| 137 delegate_->StartCapturingKeyStrokes(); | 142 delegate_->StartCapturingKeyStrokes(); |
| 138 } | 143 } |
| 139 | 144 |
| 140 void InstantClient::StopCapturingKeyStrokes(int page_id) { | 145 void InstantClient::StopCapturingKeyStrokes(int page_id) { |
| 141 if (web_contents()->IsActiveEntry(page_id)) | 146 if (web_contents()->IsActiveEntry(page_id)) |
| 142 delegate_->StopCapturingKeyStrokes(); | 147 delegate_->StopCapturingKeyStrokes(); |
| 143 } | 148 } |
| OLD | NEW |