| 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/pepper_plugin_delegate_impl.h" | 5 #include "chrome/renderer/pepper_plugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include "app/surface/transport_dib.h" | 7 #include "app/surface/transport_dib.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 158 } |
| 159 | 159 |
| 160 // Implements the VideoDecoder. | 160 // Implements the VideoDecoder. |
| 161 class PlatformVideoDecoderImpl | 161 class PlatformVideoDecoderImpl |
| 162 : public pepper::PluginDelegate::PlatformVideoDecoder { | 162 : public pepper::PluginDelegate::PlatformVideoDecoder { |
| 163 public: | 163 public: |
| 164 PlatformVideoDecoderImpl() | 164 PlatformVideoDecoderImpl() |
| 165 : input_buffer_size_(0), | 165 : input_buffer_size_(0), |
| 166 next_dib_id_(0), | 166 next_dib_id_(0), |
| 167 dib_(NULL) { | 167 dib_(NULL) { |
| 168 memset(&decoder_config_, 0, sizeof(decoder_config_)); |
| 168 memset(&flush_callback_, 0, sizeof(flush_callback_)); | 169 memset(&flush_callback_, 0, sizeof(flush_callback_)); |
| 169 } | 170 } |
| 170 | 171 |
| 171 virtual bool Init(const PP_VideoDecoderConfig& decoder_config) { | 172 virtual bool Init(const PP_VideoDecoderConfig& decoder_config) { |
| 172 decoder_config_ = decoder_config; | 173 decoder_config_ = decoder_config; |
| 173 input_buffer_size_ = 1024 << 4; | 174 input_buffer_size_ = 1024 << 4; |
| 174 | 175 |
| 175 // Allocate the transport DIB. | 176 // Allocate the transport DIB. |
| 176 TransportDIB* dib = TransportDIB::Create(input_buffer_size_, | 177 TransportDIB* dib = TransportDIB::Create(input_buffer_size_, |
| 177 next_dib_id_++); | 178 next_dib_id_++); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 } else { | 371 } else { |
| 371 return NULL; | 372 return NULL; |
| 372 } | 373 } |
| 373 } | 374 } |
| 374 | 375 |
| 375 bool PepperPluginDelegateImpl::RunFileChooser( | 376 bool PepperPluginDelegateImpl::RunFileChooser( |
| 376 const WebKit::WebFileChooserParams& params, | 377 const WebKit::WebFileChooserParams& params, |
| 377 WebKit::WebFileChooserCompletion* chooser_completion) { | 378 WebKit::WebFileChooserCompletion* chooser_completion) { |
| 378 return render_view_->runFileChooser(params, chooser_completion); | 379 return render_view_->runFileChooser(params, chooser_completion); |
| 379 } | 380 } |
| OLD | NEW |