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_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/pickle.h" | 10 #include "base/pickle.h" |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 } | 443 } |
444 surface->AddDestructionDependency(sequence); | 444 surface->AddDestructionDependency(sequence); |
445 } | 445 } |
446 | 446 |
447 void BrowserPluginGuest::SetContentsOpaque(bool opaque) { | 447 void BrowserPluginGuest::SetContentsOpaque(bool opaque) { |
448 SendMessageToEmbedder( | 448 SendMessageToEmbedder( |
449 new BrowserPluginMsg_SetContentsOpaque( | 449 new BrowserPluginMsg_SetContentsOpaque( |
450 browser_plugin_instance_id(), opaque)); | 450 browser_plugin_instance_id(), opaque)); |
451 } | 451 } |
452 | 452 |
453 bool BrowserPluginGuest::Find(int request_id, | 453 bool BrowserPluginGuest::HandleFindForEmbedder( |
454 const base::string16& search_text, | 454 int request_id, |
455 const blink::WebFindOptions& options) { | 455 const base::string16& search_text, |
456 return delegate_->Find(request_id, search_text, options); | 456 const blink::WebFindOptions& options) { |
| 457 return delegate_->HandleFindForEmbedder(request_id, search_text, options); |
457 } | 458 } |
458 | 459 |
459 bool BrowserPluginGuest::StopFinding(StopFindAction action) { | 460 bool BrowserPluginGuest::HandleStopFindingForEmbedder(StopFindAction action) { |
460 return delegate_->StopFinding(action); | 461 return delegate_->HandleStopFindingForEmbedder(action); |
461 } | 462 } |
462 | 463 |
463 void BrowserPluginGuest::ResendEventToEmbedder( | 464 void BrowserPluginGuest::ResendEventToEmbedder( |
464 const blink::WebInputEvent& event) { | 465 const blink::WebInputEvent& event) { |
465 if (!attached() || !owner_web_contents_) | 466 if (!attached() || !owner_web_contents_) |
466 return; | 467 return; |
467 | 468 |
468 DCHECK(browser_plugin_instance_id_); | 469 DCHECK(browser_plugin_instance_id_); |
469 RenderWidgetHostImpl* host = | 470 RenderWidgetHostImpl* host = |
470 embedder_web_contents()->GetMainFrame()->GetRenderWidgetHost(); | 471 embedder_web_contents()->GetMainFrame()->GetRenderWidgetHost(); |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 range, character_bounds); | 1055 range, character_bounds); |
1055 } | 1056 } |
1056 #endif | 1057 #endif |
1057 | 1058 |
1058 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1059 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
1059 if (delegate_) | 1060 if (delegate_) |
1060 delegate_->SetContextMenuPosition(position); | 1061 delegate_->SetContextMenuPosition(position); |
1061 } | 1062 } |
1062 | 1063 |
1063 } // namespace content | 1064 } // namespace content |
OLD | NEW |