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_host.h" | 5 #include "content/browser/browser_plugin/browser_plugin_host.h" |
6 | 6 |
7 #include "content/browser/browser_plugin/browser_plugin_host_helper.h" | 7 #include "content/browser/browser_plugin/browser_plugin_host_helper.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_messages.h" | 10 #include "content/common/browser_plugin_messages.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 } | 48 } |
49 | 49 |
50 void BrowserPluginHost::RegisterContainerInstance( | 50 void BrowserPluginHost::RegisterContainerInstance( |
51 int container_id, | 51 int container_id, |
52 BrowserPluginHost* observer) { | 52 BrowserPluginHost* observer) { |
53 DCHECK(guests_by_container_id_.find(container_id) == | 53 DCHECK(guests_by_container_id_.find(container_id) == |
54 guests_by_container_id_.end()); | 54 guests_by_container_id_.end()); |
55 guests_by_container_id_[container_id] = observer; | 55 guests_by_container_id_[container_id] = observer; |
56 } | 56 } |
57 | 57 |
| 58 bool BrowserPluginHost::TakeFocus(bool reverse) { |
| 59 embedder_render_process_host()->Send( |
| 60 new BrowserPluginMsg_AdvanceFocus(instance_id(), reverse)); |
| 61 return true; |
| 62 } |
| 63 |
58 bool BrowserPluginHost::OnMessageReceived(const IPC::Message& message) { | 64 bool BrowserPluginHost::OnMessageReceived(const IPC::Message& message) { |
59 bool handled = true; | 65 bool handled = true; |
60 IPC_BEGIN_MESSAGE_MAP(BrowserPluginHost, message) | 66 IPC_BEGIN_MESSAGE_MAP(BrowserPluginHost, message) |
61 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_NavigateFromGuest, | 67 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_NavigateFromGuest, |
62 OnNavigateFromGuest) | 68 OnNavigateFromGuest) |
63 IPC_MESSAGE_UNHANDLED(handled = false) | 69 IPC_MESSAGE_UNHANDLED(handled = false) |
64 IPC_END_MESSAGE_MAP() | 70 IPC_END_MESSAGE_MAP() |
65 return handled; | 71 return handled; |
66 } | 72 } |
67 | 73 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 web_contents->HideContents(); | 218 web_contents->HideContents(); |
213 } | 219 } |
214 break; | 220 break; |
215 } | 221 } |
216 default: | 222 default: |
217 NOTREACHED() << "Unexpected notification type: " << type; | 223 NOTREACHED() << "Unexpected notification type: " << type; |
218 } | 224 } |
219 } | 225 } |
220 | 226 |
221 } // namespace content | 227 } // namespace content |
OLD | NEW |