| 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 response->SetString(devtools::Page::screencastFrame::kParamData, | 491 response->SetString(devtools::Page::screencastFrame::kParamData, |
| 492 base_64_data); | 492 base_64_data); |
| 493 | 493 |
| 494 SendAsyncResponse(command->SuccessResponse(response)); | 494 SendAsyncResponse(command->SuccessResponse(response)); |
| 495 } | 495 } |
| 496 | 496 |
| 497 scoped_refptr<DevToolsProtocol::Response> | 497 scoped_refptr<DevToolsProtocol::Response> |
| 498 RendererOverridesHandler::PageCanScreencast( | 498 RendererOverridesHandler::PageCanScreencast( |
| 499 scoped_refptr<DevToolsProtocol::Command> command) { | 499 scoped_refptr<DevToolsProtocol::Command> command) { |
| 500 base::DictionaryValue* result = new base::DictionaryValue(); | 500 base::DictionaryValue* result = new base::DictionaryValue(); |
| 501 #if defined(OS_ANDROID) || defined(DEBUG_DEVTOOLS) | 501 #if defined(OS_ANDROID) |
| 502 result->SetBoolean(devtools::kResult, true); | 502 result->SetBoolean(devtools::kResult, true); |
| 503 #else | 503 #else |
| 504 result->SetBoolean(devtools::kResult, false); | 504 result->SetBoolean(devtools::kResult, false); |
| 505 #endif // defined(OS_ANDROID) || defined(DEBUG_DEVTOOLS) | 505 #endif // defined(OS_ANDROID) |
| 506 return command->SuccessResponse(result); | 506 return command->SuccessResponse(result); |
| 507 } | 507 } |
| 508 | 508 |
| 509 scoped_refptr<DevToolsProtocol::Response> | 509 scoped_refptr<DevToolsProtocol::Response> |
| 510 RendererOverridesHandler::PageStartScreencast( | 510 RendererOverridesHandler::PageStartScreencast( |
| 511 scoped_refptr<DevToolsProtocol::Command> command) { | 511 scoped_refptr<DevToolsProtocol::Command> command) { |
| 512 screencast_command_ = command; | 512 screencast_command_ = command; |
| 513 RenderViewHostImpl* host = static_cast<RenderViewHostImpl*>( | 513 RenderViewHostImpl* host = static_cast<RenderViewHostImpl*>( |
| 514 agent_->GetRenderViewHost()); | 514 agent_->GetRenderViewHost()); |
| 515 bool visible = !host->is_hidden(); | 515 bool visible = !host->is_hidden(); |
| (...skipping 484 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 |