Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(681)

Side by Side Diff: remoting/client/frame_consumer_proxy.cc

Issue 10801003: Propagate DPI information to web-app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer feedback. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/client/frame_consumer_proxy.h ('k') | remoting/client/plugin/chromoting_instance.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "remoting/client/frame_consumer_proxy.h" 5 #include "remoting/client/frame_consumer_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "ppapi/cpp/image_data.h" 10 #include "ppapi/cpp/image_data.h"
(...skipping 24 matching lines...) Expand all
35 if (!task_runner_->BelongsToCurrentThread()) { 35 if (!task_runner_->BelongsToCurrentThread()) {
36 task_runner_->PostTask(FROM_HERE, base::Bind( 36 task_runner_->PostTask(FROM_HERE, base::Bind(
37 &FrameConsumerProxy::ReturnBuffer, this, buffer)); 37 &FrameConsumerProxy::ReturnBuffer, this, buffer));
38 return; 38 return;
39 } 39 }
40 40
41 if (frame_consumer_) 41 if (frame_consumer_)
42 frame_consumer_->ReturnBuffer(buffer); 42 frame_consumer_->ReturnBuffer(buffer);
43 } 43 }
44 44
45 void FrameConsumerProxy::SetSourceSize(const SkISize& source_size) { 45 void FrameConsumerProxy::SetSourceSize(const SkISize& source_size,
46 const SkIPoint& source_dpi) {
46 if (!task_runner_->BelongsToCurrentThread()) { 47 if (!task_runner_->BelongsToCurrentThread()) {
47 task_runner_->PostTask(FROM_HERE, base::Bind( 48 task_runner_->PostTask(FROM_HERE, base::Bind(
48 &FrameConsumerProxy::SetSourceSize, this, source_size)); 49 &FrameConsumerProxy::SetSourceSize, this, source_size, source_dpi));
49 return; 50 return;
50 } 51 }
51 52
52 if (frame_consumer_) 53 if (frame_consumer_)
53 frame_consumer_->SetSourceSize(source_size); 54 frame_consumer_->SetSourceSize(source_size, source_dpi);
54 } 55 }
55 56
56 void FrameConsumerProxy::Attach( 57 void FrameConsumerProxy::Attach(
57 const base::WeakPtr<FrameConsumer>& frame_consumer) { 58 const base::WeakPtr<FrameConsumer>& frame_consumer) {
58 DCHECK(task_runner_->BelongsToCurrentThread()); 59 DCHECK(task_runner_->BelongsToCurrentThread());
59 DCHECK(frame_consumer_ == NULL); 60 DCHECK(frame_consumer_ == NULL);
60 frame_consumer_ = frame_consumer; 61 frame_consumer_ = frame_consumer;
61 } 62 }
62 63
63 FrameConsumerProxy::~FrameConsumerProxy() { 64 FrameConsumerProxy::~FrameConsumerProxy() {
64 } 65 }
65 66
66 } // namespace remoting 67 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/frame_consumer_proxy.h ('k') | remoting/client/plugin/chromoting_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698