| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 5969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5980 return dib_handle; | 5980 return dib_handle; |
| 5981 // Return an invalid handle if Send() fails. | 5981 // Return an invalid handle if Send() fails. |
| 5982 return TransportDIB::DefaultHandleValue(); | 5982 return TransportDIB::DefaultHandleValue(); |
| 5983 } | 5983 } |
| 5984 | 5984 |
| 5985 void RenderView::AcceleratedSurfaceFreeTransportDIB(TransportDIB::Id dib_id) { | 5985 void RenderView::AcceleratedSurfaceFreeTransportDIB(TransportDIB::Id dib_id) { |
| 5986 Send(new ViewHostMsg_FreeTransportDIB(dib_id)); | 5986 Send(new ViewHostMsg_FreeTransportDIB(dib_id)); |
| 5987 } | 5987 } |
| 5988 | 5988 |
| 5989 void RenderView::AcceleratedSurfaceBuffersSwapped( | 5989 void RenderView::AcceleratedSurfaceBuffersSwapped( |
| 5990 gfx::PluginWindowHandle window) { | 5990 gfx::PluginWindowHandle window, uint64 surface_id) { |
| 5991 Send(new ViewHostMsg_AcceleratedSurfaceBuffersSwapped(routing_id(), window)); | 5991 Send(new ViewHostMsg_AcceleratedSurfaceBuffersSwapped( |
| 5992 routing_id(), window, surface_id)); |
| 5992 } | 5993 } |
| 5993 #endif | 5994 #endif |
| 5994 | 5995 |
| 5995 bool RenderView::ScheduleFileChooser( | 5996 bool RenderView::ScheduleFileChooser( |
| 5996 const ViewHostMsg_RunFileChooser_Params& params, | 5997 const ViewHostMsg_RunFileChooser_Params& params, |
| 5997 WebFileChooserCompletion* completion) { | 5998 WebFileChooserCompletion* completion) { |
| 5998 static const size_t kMaximumPendingFileChooseRequests = 4; | 5999 static const size_t kMaximumPendingFileChooseRequests = 4; |
| 5999 if (file_chooser_completions_.size() > kMaximumPendingFileChooseRequests) { | 6000 if (file_chooser_completions_.size() > kMaximumPendingFileChooseRequests) { |
| 6000 // This sanity check prevents too many file choose requests from getting | 6001 // This sanity check prevents too many file choose requests from getting |
| 6001 // queued which could DoS the user. Getting these is most likely a | 6002 // queued which could DoS the user. Getting these is most likely a |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6124 IPC::PlatformFileForTransitToPlatformFile(file_for_transit), | 6125 IPC::PlatformFileForTransitToPlatformFile(file_for_transit), |
| 6125 message_id); | 6126 message_id); |
| 6126 } | 6127 } |
| 6127 | 6128 |
| 6128 #if defined(OS_MACOSX) | 6129 #if defined(OS_MACOSX) |
| 6129 void RenderView::OnSelectPopupMenuItem(int selected_index) { | 6130 void RenderView::OnSelectPopupMenuItem(int selected_index) { |
| 6130 external_popup_menu_->DidSelectItem(selected_index); | 6131 external_popup_menu_->DidSelectItem(selected_index); |
| 6131 external_popup_menu_.reset(); | 6132 external_popup_menu_.reset(); |
| 6132 } | 6133 } |
| 6133 #endif | 6134 #endif |
| OLD | NEW |