| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/glue/webmediaplayer_impl.h" | 5 #include "webkit/glue/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // Now we can safely cast to int64 microseconds. | 91 // Now we can safely cast to int64 microseconds. |
| 92 return base::TimeDelta::FromMicroseconds(static_cast<int64>(integer)); | 92 return base::TimeDelta::FromMicroseconds(static_cast<int64>(integer)); |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace | 95 } // namespace |
| 96 | 96 |
| 97 namespace webkit_glue { | 97 namespace webkit_glue { |
| 98 | 98 |
| 99 WebMediaPlayerImpl::WebMediaPlayerImpl( | 99 WebMediaPlayerImpl::WebMediaPlayerImpl( |
| 100 WebKit::WebMediaPlayerClient* client, | 100 WebKit::WebMediaPlayerClient* client, |
| 101 WebMediaPlayerDelegate* delegate, | 101 base::WeakPtr<WebMediaPlayerDelegate> delegate, |
| 102 media::FilterCollection* collection, | 102 media::FilterCollection* collection, |
| 103 media::MessageLoopFactory* message_loop_factory, | 103 media::MessageLoopFactory* message_loop_factory, |
| 104 MediaStreamClient* media_stream_client, | 104 MediaStreamClient* media_stream_client, |
| 105 media::MediaLog* media_log) | 105 media::MediaLog* media_log) |
| 106 : network_state_(WebKit::WebMediaPlayer::Empty), | 106 : network_state_(WebKit::WebMediaPlayer::Empty), |
| 107 ready_state_(WebKit::WebMediaPlayer::HaveNothing), | 107 ready_state_(WebKit::WebMediaPlayer::HaveNothing), |
| 108 main_loop_(NULL), | 108 main_loop_(NULL), |
| 109 filter_collection_(collection), | 109 filter_collection_(collection), |
| 110 pipeline_(NULL), | 110 pipeline_(NULL), |
| 111 message_loop_factory_(message_loop_factory), | 111 message_loop_factory_(message_loop_factory), |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 return client_; | 858 return client_; |
| 859 } | 859 } |
| 860 | 860 |
| 861 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { | 861 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { |
| 862 DCHECK_EQ(main_loop_, MessageLoop::current()); | 862 DCHECK_EQ(main_loop_, MessageLoop::current()); |
| 863 incremented_externally_allocated_memory_ = true; | 863 incremented_externally_allocated_memory_ = true; |
| 864 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); | 864 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); |
| 865 } | 865 } |
| 866 | 866 |
| 867 } // namespace webkit_glue | 867 } // namespace webkit_glue |
| OLD | NEW |