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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
388 | 388 |
389 void WebMediaPlayerImpl::setVolume(float volume) { | 389 void WebMediaPlayerImpl::setVolume(float volume) { |
390 DCHECK_EQ(main_loop_, MessageLoop::current()); | 390 DCHECK_EQ(main_loop_, MessageLoop::current()); |
391 | 391 |
392 pipeline_->SetVolume(volume); | 392 pipeline_->SetVolume(volume); |
393 } | 393 } |
394 | 394 |
395 void WebMediaPlayerImpl::setVisible(bool visible) { | 395 void WebMediaPlayerImpl::setVisible(bool visible) { |
396 DCHECK_EQ(main_loop_, MessageLoop::current()); | 396 DCHECK_EQ(main_loop_, MessageLoop::current()); |
397 | 397 |
398 // Update controls as data buffers when paused. HTMLMediaElement issues a | |
399 // RenderVideo->updateFromElement() which ends in a call to here. | |
scherkus (not reviewing)
2011/11/16 02:09:25
I think the part I'm more interested in is when/wh
DaleCurtis
2011/11/16 02:31:49
Done.
| |
400 if (visible && paused_) | |
401 Repaint(); | |
402 | |
398 // TODO(hclam): add appropriate method call when pipeline has it implemented. | 403 // TODO(hclam): add appropriate method call when pipeline has it implemented. |
scherkus (not reviewing)
2011/11/16 02:09:25
do you know what this TODO might be referring to?
DaleCurtis
2011/11/16 02:31:49
I sent him an email. I'll report back.
On 2011/11
| |
399 return; | 404 return; |
400 } | 405 } |
401 | 406 |
402 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, chromium_name) \ | 407 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, chromium_name) \ |
403 COMPILE_ASSERT(static_cast<int>(WebKit::WebMediaPlayer::webkit_name) == \ | 408 COMPILE_ASSERT(static_cast<int>(WebKit::WebMediaPlayer::webkit_name) == \ |
404 static_cast<int>(media::chromium_name), \ | 409 static_cast<int>(media::chromium_name), \ |
405 mismatching_enums) | 410 mismatching_enums) |
406 COMPILE_ASSERT_MATCHING_ENUM(None, NONE); | 411 COMPILE_ASSERT_MATCHING_ENUM(None, NONE); |
407 COMPILE_ASSERT_MATCHING_ENUM(MetaData, METADATA); | 412 COMPILE_ASSERT_MATCHING_ENUM(MetaData, METADATA); |
408 COMPILE_ASSERT_MATCHING_ENUM(Auto, AUTO); | 413 COMPILE_ASSERT_MATCHING_ENUM(Auto, AUTO); |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
868 return client_; | 873 return client_; |
869 } | 874 } |
870 | 875 |
871 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { | 876 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { |
872 DCHECK_EQ(main_loop_, MessageLoop::current()); | 877 DCHECK_EQ(main_loop_, MessageLoop::current()); |
873 incremented_externally_allocated_memory_ = true; | 878 incremented_externally_allocated_memory_ = true; |
874 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); | 879 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); |
875 } | 880 } |
876 | 881 |
877 } // namespace webkit_glue | 882 } // namespace webkit_glue |
OLD | NEW |