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

Side by Side Diff: content/browser/media/capture/desktop_capture_device_aura.cc

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/media/capture/desktop_capture_device_aura.h" 5 #include "content/browser/media/capture/desktop_capture_device_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/timer/timer.h" 8 #include "base/timer/timer.h"
9 #include "cc/output/copy_output_request.h" 9 #include "cc/output/copy_output_request.h"
10 #include "cc/output/copy_output_result.h" 10 #include "cc/output/copy_output_result.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 video_frame, 349 video_frame,
350 scaled_cursor_bitmap_, 350 scaled_cursor_bitmap_,
351 cursor_position_in_frame, 351 cursor_position_in_frame,
352 base::Passed(&release_callback))); 352 base::Passed(&release_callback)));
353 } 353 }
354 354
355 gfx::Point DesktopVideoCaptureMachine::UpdateCursorState( 355 gfx::Point DesktopVideoCaptureMachine::UpdateCursorState(
356 const gfx::Rect& region_in_frame) { 356 const gfx::Rect& region_in_frame) {
357 const gfx::Rect desktop_bounds = desktop_layer_->bounds(); 357 const gfx::Rect desktop_bounds = desktop_layer_->bounds();
358 gfx::NativeCursor cursor = 358 gfx::NativeCursor cursor =
359 desktop_window_->GetDispatcher()->host()->last_cursor(); 359 desktop_window_->GetHost()->last_cursor();
360 if (last_cursor_ != cursor) { 360 if (last_cursor_ != cursor) {
361 SkBitmap cursor_bitmap; 361 SkBitmap cursor_bitmap;
362 if (ui::GetCursorBitmap(cursor, &cursor_bitmap, &cursor_hot_point_)) { 362 if (ui::GetCursorBitmap(cursor, &cursor_bitmap, &cursor_hot_point_)) {
363 scaled_cursor_bitmap_ = skia::ImageOperations::Resize( 363 scaled_cursor_bitmap_ = skia::ImageOperations::Resize(
364 cursor_bitmap, 364 cursor_bitmap,
365 skia::ImageOperations::RESIZE_BEST, 365 skia::ImageOperations::RESIZE_BEST,
366 cursor_bitmap.width() * region_in_frame.width() / 366 cursor_bitmap.width() * region_in_frame.width() /
367 desktop_bounds.width(), 367 desktop_bounds.width(),
368 cursor_bitmap.height() * region_in_frame.height() / 368 cursor_bitmap.height() * region_in_frame.height() /
369 desktop_bounds.height()); 369 desktop_bounds.height());
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 scoped_ptr<Client> client) { 440 scoped_ptr<Client> client) {
441 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString(); 441 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString();
442 core_->AllocateAndStart(params, client.Pass()); 442 core_->AllocateAndStart(params, client.Pass());
443 } 443 }
444 444
445 void DesktopCaptureDeviceAura::StopAndDeAllocate() { 445 void DesktopCaptureDeviceAura::StopAndDeAllocate() {
446 core_->StopAndDeAllocate(); 446 core_->StopAndDeAllocate();
447 } 447 }
448 448
449 } // namespace content 449 } // namespace content
OLDNEW
« no previous file with comments | « chrome/test/base/view_event_test_base.cc ('k') | content/browser/renderer_host/input/synthetic_gesture_target_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698