| OLD | NEW |
| 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 4492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4503 Send(new FrameHostMsg_Are3DAPIsBlocked( | 4503 Send(new FrameHostMsg_Are3DAPIsBlocked( |
| 4504 routing_id_, | 4504 routing_id_, |
| 4505 blink::WebStringToGURL(frame_->top()->getSecurityOrigin().toString()), | 4505 blink::WebStringToGURL(frame_->top()->getSecurityOrigin().toString()), |
| 4506 THREE_D_API_TYPE_WEBGL, &blocked)); | 4506 THREE_D_API_TYPE_WEBGL, &blocked)); |
| 4507 return !blocked; | 4507 return !blocked; |
| 4508 } | 4508 } |
| 4509 | 4509 |
| 4510 blink::WebScreenOrientationClient* | 4510 blink::WebScreenOrientationClient* |
| 4511 RenderFrameImpl::webScreenOrientationClient() { | 4511 RenderFrameImpl::webScreenOrientationClient() { |
| 4512 if (!screen_orientation_dispatcher_) | 4512 if (!screen_orientation_dispatcher_) |
| 4513 screen_orientation_dispatcher_ = new ScreenOrientationDispatcher(this); | 4513 // Connect to the remote service and give the proxy thus obtained to the |
| 4514 // dispatcher. |
| 4515 GetRemoteInterfaces()->GetInterface(&screen_orientation_service_); |
| 4516 screen_orientation_dispatcher_ = |
| 4517 new ScreenOrientationDispatcher(screen_orientation_service_.get()); |
| 4514 return screen_orientation_dispatcher_; | 4518 return screen_orientation_dispatcher_; |
| 4515 } | 4519 } |
| 4516 | 4520 |
| 4517 bool RenderFrameImpl::isControlledByServiceWorker(WebDataSource& data_source) { | 4521 bool RenderFrameImpl::isControlledByServiceWorker(WebDataSource& data_source) { |
| 4518 ServiceWorkerNetworkProvider* provider = | 4522 ServiceWorkerNetworkProvider* provider = |
| 4519 ServiceWorkerNetworkProvider::FromDocumentState( | 4523 ServiceWorkerNetworkProvider::FromDocumentState( |
| 4520 DocumentState::FromDataSource(&data_source)); | 4524 DocumentState::FromDataSource(&data_source)); |
| 4521 return provider->IsControlledByServiceWorker(); | 4525 return provider->IsControlledByServiceWorker(); |
| 4522 } | 4526 } |
| 4523 | 4527 |
| (...skipping 2014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6538 // event target. Potentially a Pepper plugin will receive the event. | 6542 // event target. Potentially a Pepper plugin will receive the event. |
| 6539 // In order to tell whether a plugin gets the last mouse event and which it | 6543 // In order to tell whether a plugin gets the last mouse event and which it |
| 6540 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6544 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6541 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6545 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6542 // |pepper_last_mouse_event_target_|. | 6546 // |pepper_last_mouse_event_target_|. |
| 6543 pepper_last_mouse_event_target_ = nullptr; | 6547 pepper_last_mouse_event_target_ = nullptr; |
| 6544 #endif | 6548 #endif |
| 6545 } | 6549 } |
| 6546 | 6550 |
| 6547 } // namespace content | 6551 } // namespace content |
| OLD | NEW |