OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/devtools/renderer_overrides_handler.h" | 5 #include "content/browser/devtools/renderer_overrides_handler.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/barrier_closure.h" | 10 #include "base/barrier_closure.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 gfx::Size snapshot_size_dip(gfx::ToRoundedSize( | 257 gfx::Size snapshot_size_dip(gfx::ToRoundedSize( |
258 gfx::ScaleSize(viewport_size_dip, scale))); | 258 gfx::ScaleSize(viewport_size_dip, scale))); |
259 | 259 |
260 if (snapshot_size_dip.width() > 0 && snapshot_size_dip.height() > 0) { | 260 if (snapshot_size_dip.width() > 0 && snapshot_size_dip.height() > 0) { |
261 gfx::Rect viewport_bounds_dip(gfx::ToRoundedSize(viewport_size_dip)); | 261 gfx::Rect viewport_bounds_dip(gfx::ToRoundedSize(viewport_size_dip)); |
262 view->CopyFromCompositingSurface( | 262 view->CopyFromCompositingSurface( |
263 viewport_bounds_dip, snapshot_size_dip, | 263 viewport_bounds_dip, snapshot_size_dip, |
264 base::Bind(&RendererOverridesHandler::ScreencastFrameCaptured, | 264 base::Bind(&RendererOverridesHandler::ScreencastFrameCaptured, |
265 weak_factory_.GetWeakPtr(), | 265 weak_factory_.GetWeakPtr(), |
266 format, quality, last_compositor_frame_metadata_), | 266 format, quality, last_compositor_frame_metadata_), |
267 SkBitmap::kARGB_8888_Config); | 267 kN32_SkColorType); |
268 } | 268 } |
269 } | 269 } |
270 | 270 |
271 // DOM agent handlers -------------------------------------------------------- | 271 // DOM agent handlers -------------------------------------------------------- |
272 | 272 |
273 scoped_refptr<DevToolsProtocol::Response> | 273 scoped_refptr<DevToolsProtocol::Response> |
274 RendererOverridesHandler::GrantPermissionsForSetFileInputFiles( | 274 RendererOverridesHandler::GrantPermissionsForSetFileInputFiles( |
275 scoped_refptr<DevToolsProtocol::Command> command) { | 275 scoped_refptr<DevToolsProtocol::Command> command) { |
276 base::DictionaryValue* params = command->params(); | 276 base::DictionaryValue* params = command->params(); |
277 base::ListValue* file_list = NULL; | 277 base::ListValue* file_list = NULL; |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 return NULL; | 1000 return NULL; |
1001 } | 1001 } |
1002 event.data.pinchUpdate.scale = static_cast<float>(scale); | 1002 event.data.pinchUpdate.scale = static_cast<float>(scale); |
1003 } | 1003 } |
1004 | 1004 |
1005 host->ForwardGestureEvent(event); | 1005 host->ForwardGestureEvent(event); |
1006 return command->SuccessResponse(NULL); | 1006 return command->SuccessResponse(NULL); |
1007 } | 1007 } |
1008 | 1008 |
1009 } // namespace content | 1009 } // namespace content |
OLD | NEW |