| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 IPC_BEGIN_MESSAGE_MAP(InstantClient, message) | 90 IPC_BEGIN_MESSAGE_MAP(InstantClient, message) |
| 91 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_SetSuggestions, SetSuggestions) | 91 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_SetSuggestions, SetSuggestions) |
| 92 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_InstantSupportDetermined, | 92 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_InstantSupportDetermined, |
| 93 InstantSupportDetermined) | 93 InstantSupportDetermined) |
| 94 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ShowInstantPreview, | 94 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ShowInstantPreview, |
| 95 ShowInstantPreview) | 95 ShowInstantPreview) |
| 96 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_StartCapturingKeyStrokes, | 96 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_StartCapturingKeyStrokes, |
| 97 StartCapturingKeyStrokes); | 97 StartCapturingKeyStrokes); |
| 98 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_StopCapturingKeyStrokes, | 98 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_StopCapturingKeyStrokes, |
| 99 StopCapturingKeyStrokes); | 99 StopCapturingKeyStrokes); |
| 100 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_SearchBoxNavigate, |
| 101 SearchBoxNavigate); |
| 100 IPC_MESSAGE_UNHANDLED(handled = false) | 102 IPC_MESSAGE_UNHANDLED(handled = false) |
| 101 IPC_END_MESSAGE_MAP() | 103 IPC_END_MESSAGE_MAP() |
| 102 return handled; | 104 return handled; |
| 103 } | 105 } |
| 104 | 106 |
| 105 void InstantClient::RenderViewGone(base::TerminationStatus status) { | 107 void InstantClient::RenderViewGone(base::TerminationStatus status) { |
| 106 delegate_->RenderViewGone(); | 108 delegate_->RenderViewGone(); |
| 107 } | 109 } |
| 108 | 110 |
| 109 void InstantClient::DidCommitProvisionalLoadForFrame( | 111 void InstantClient::DidCommitProvisionalLoadForFrame( |
| (...skipping 29 matching lines...) Expand all Loading... |
| 139 | 141 |
| 140 void InstantClient::StartCapturingKeyStrokes(int page_id) { | 142 void InstantClient::StartCapturingKeyStrokes(int page_id) { |
| 141 if (web_contents()->IsActiveEntry(page_id)) | 143 if (web_contents()->IsActiveEntry(page_id)) |
| 142 delegate_->StartCapturingKeyStrokes(); | 144 delegate_->StartCapturingKeyStrokes(); |
| 143 } | 145 } |
| 144 | 146 |
| 145 void InstantClient::StopCapturingKeyStrokes(int page_id) { | 147 void InstantClient::StopCapturingKeyStrokes(int page_id) { |
| 146 if (web_contents()->IsActiveEntry(page_id)) | 148 if (web_contents()->IsActiveEntry(page_id)) |
| 147 delegate_->StopCapturingKeyStrokes(); | 149 delegate_->StopCapturingKeyStrokes(); |
| 148 } | 150 } |
| 151 |
| 152 void InstantClient::SearchBoxNavigate(int page_id, |
| 153 const GURL& url, |
| 154 content::PageTransition transition) { |
| 155 if (web_contents()->IsActiveEntry(page_id)) |
| 156 delegate_->NavigateToURL(url, transition); |
| 157 } |
| OLD | NEW |