| 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 "content/renderer/browser_plugin/browser_plugin.h" | 5 #include "content/renderer/browser_plugin/browser_plugin.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 return; | 175 return; |
| 176 | 176 |
| 177 BrowserPluginMsg_CompositorFrameSwapped::Param param; | 177 BrowserPluginMsg_CompositorFrameSwapped::Param param; |
| 178 if (!BrowserPluginMsg_CompositorFrameSwapped::Read(&message, ¶m)) | 178 if (!BrowserPluginMsg_CompositorFrameSwapped::Read(&message, ¶m)) |
| 179 return; | 179 return; |
| 180 // Note that there is no need to send ACK for this message. | 180 // Note that there is no need to send ACK for this message. |
| 181 // If the guest has updated pixels then it is no longer crashed. | 181 // If the guest has updated pixels then it is no longer crashed. |
| 182 guest_crashed_ = false; | 182 guest_crashed_ = false; |
| 183 | 183 |
| 184 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); | 184 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); |
| 185 get<1>(param).frame.AssignTo(frame.get()); | 185 base::get<1>(param).frame.AssignTo(frame.get()); |
| 186 | 186 |
| 187 EnableCompositing(true); | 187 EnableCompositing(true); |
| 188 compositing_helper_->OnCompositorFrameSwapped( | 188 compositing_helper_->OnCompositorFrameSwapped( |
| 189 frame.Pass(), | 189 frame.Pass(), |
| 190 get<1>(param).producing_route_id, | 190 base::get<1>(param).producing_route_id, |
| 191 get<1>(param).output_surface_id, | 191 base::get<1>(param).output_surface_id, |
| 192 get<1>(param).producing_host_id, | 192 base::get<1>(param).producing_host_id, |
| 193 get<1>(param).shared_memory_handle); | 193 base::get<1>(param).shared_memory_handle); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void BrowserPlugin::OnGuestGone(int browser_plugin_instance_id) { | 196 void BrowserPlugin::OnGuestGone(int browser_plugin_instance_id) { |
| 197 guest_crashed_ = true; | 197 guest_crashed_ = true; |
| 198 | 198 |
| 199 // Turn off compositing so we can display the sad graphic. Changes to | 199 // Turn off compositing so we can display the sad graphic. Changes to |
| 200 // compositing state will show up at a later time after a layout and commit. | 200 // compositing state will show up at a later time after a layout and commit. |
| 201 EnableCompositing(false); | 201 EnableCompositing(false); |
| 202 | 202 |
| 203 // Queue up showing the sad graphic to give content embedders an opportunity | 203 // Queue up showing the sad graphic to give content embedders an opportunity |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 bool BrowserPlugin::HandleMouseLockedInputEvent( | 612 bool BrowserPlugin::HandleMouseLockedInputEvent( |
| 613 const blink::WebMouseEvent& event) { | 613 const blink::WebMouseEvent& event) { |
| 614 BrowserPluginManager::Get()->Send( | 614 BrowserPluginManager::Get()->Send( |
| 615 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, | 615 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, |
| 616 view_rect_, | 616 view_rect_, |
| 617 &event)); | 617 &event)); |
| 618 return true; | 618 return true; |
| 619 } | 619 } |
| 620 | 620 |
| 621 } // namespace content | 621 } // namespace content |
| OLD | NEW |