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/media/webmediaplayer_impl.h" | 5 #include "webkit/media/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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 : network_state_(WebKit::WebMediaPlayer::Empty), | 108 : network_state_(WebKit::WebMediaPlayer::Empty), |
109 ready_state_(WebKit::WebMediaPlayer::HaveNothing), | 109 ready_state_(WebKit::WebMediaPlayer::HaveNothing), |
110 main_loop_(NULL), | 110 main_loop_(NULL), |
111 filter_collection_(collection), | 111 filter_collection_(collection), |
112 pipeline_(NULL), | 112 pipeline_(NULL), |
113 message_loop_factory_(message_loop_factory), | 113 message_loop_factory_(message_loop_factory), |
114 paused_(true), | 114 paused_(true), |
115 seeking_(false), | 115 seeking_(false), |
116 playback_rate_(0.0f), | 116 playback_rate_(0.0f), |
117 pending_seek_(false), | 117 pending_seek_(false), |
| 118 pending_seek_seconds_(0.0f), |
118 client_(client), | 119 client_(client), |
119 proxy_(NULL), | 120 proxy_(NULL), |
120 delegate_(delegate), | 121 delegate_(delegate), |
121 media_stream_client_(media_stream_client), | 122 media_stream_client_(media_stream_client), |
122 media_log_(media_log), | 123 media_log_(media_log), |
123 is_accelerated_compositing_active_(false), | 124 is_accelerated_compositing_active_(false), |
124 incremented_externally_allocated_memory_(false) { | 125 incremented_externally_allocated_memory_(false) { |
125 // Saves the current message loop. | 126 // Saves the current message loop. |
126 DCHECK(!main_loop_); | 127 DCHECK(!main_loop_); |
127 main_loop_ = MessageLoop::current(); | 128 main_loop_ = MessageLoop::current(); |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 return client_; | 926 return client_; |
926 } | 927 } |
927 | 928 |
928 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { | 929 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { |
929 DCHECK_EQ(main_loop_, MessageLoop::current()); | 930 DCHECK_EQ(main_loop_, MessageLoop::current()); |
930 incremented_externally_allocated_memory_ = true; | 931 incremented_externally_allocated_memory_ = true; |
931 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); | 932 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); |
932 } | 933 } |
933 | 934 |
934 } // namespace webkit_media | 935 } // namespace webkit_media |
OLD | NEW |