OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/browser/browser_plugin/browser_plugin_embedder.h" | 5 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
6 | 6 |
7 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 7 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
8 #include "content/browser/renderer_host/render_view_host_impl.h" | 8 #include "content/browser/renderer_host/render_view_host_impl.h" |
9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
10 #include "content/common/browser_plugin/browser_plugin_messages.h" | 10 #include "content/common/browser_plugin/browser_plugin_messages.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 230 |
231 // Returns false to iterate over all guests. | 231 // Returns false to iterate over all guests. |
232 return false; | 232 return false; |
233 } | 233 } |
234 | 234 |
235 // static | 235 // static |
236 bool BrowserPluginEmbedder::FindInGuest(int request_id, | 236 bool BrowserPluginEmbedder::FindInGuest(int request_id, |
237 const base::string16& search_text, | 237 const base::string16& search_text, |
238 const blink::WebFindOptions& options, | 238 const blink::WebFindOptions& options, |
239 WebContents* guest) { | 239 WebContents* guest) { |
240 if (static_cast<WebContentsImpl*>(guest)->GetBrowserPluginGuest()->Find( | 240 if (static_cast<WebContentsImpl*>(guest) |
241 request_id, search_text, options)) { | 241 ->GetBrowserPluginGuest() |
| 242 ->HandleFindForEmbedder(request_id, search_text, options)) { |
242 // There can only ever currently be one browser plugin that handles find so | 243 // There can only ever currently be one browser plugin that handles find so |
243 // we can break the iteration at this point. | 244 // we can break the iteration at this point. |
244 return true; | 245 return true; |
245 } | 246 } |
246 return false; | 247 return false; |
247 } | 248 } |
248 | 249 |
249 // static | 250 // static |
250 bool BrowserPluginEmbedder::StopFindingInGuest(StopFindAction action, | 251 bool BrowserPluginEmbedder::StopFindingInGuest(StopFindAction action, |
251 WebContents* guest) { | 252 WebContents* guest) { |
252 if (static_cast<WebContentsImpl*>(guest)->GetBrowserPluginGuest() | 253 if (static_cast<WebContentsImpl*>(guest) |
253 ->StopFinding(action)) { | 254 ->GetBrowserPluginGuest() |
| 255 ->HandleStopFindingForEmbedder(action)) { |
254 // There can only ever currently be one browser plugin that handles find so | 256 // There can only ever currently be one browser plugin that handles find so |
255 // we can break the iteration at this point. | 257 // we can break the iteration at this point. |
256 return true; | 258 return true; |
257 } | 259 } |
258 return false; | 260 return false; |
259 } | 261 } |
260 | 262 |
261 } // namespace content | 263 } // namespace content |
OLD | NEW |