| Index: content/renderer/screen_orientation/screen_orientation_observer.cc
|
| diff --git a/content/renderer/screen_orientation/screen_orientation_observer.cc b/content/renderer/screen_orientation/screen_orientation_observer.cc
|
| index 8cb05fe386946bf7b154cd951bc6bd7a35d12d6c..c4126c5ced6b148de70830b6b6e244033d5ae8f5 100644
|
| --- a/content/renderer/screen_orientation/screen_orientation_observer.cc
|
| +++ b/content/renderer/screen_orientation/screen_orientation_observer.cc
|
| @@ -4,7 +4,7 @@
|
|
|
| #include "content/renderer/screen_orientation/screen_orientation_observer.h"
|
|
|
| -#include "content/common/screen_orientation_messages.h"
|
| +#include "content/renderer/render_thread_impl.h"
|
|
|
| namespace content {
|
|
|
| @@ -23,11 +23,20 @@ void ScreenOrientationObserver::Start(
|
| }
|
|
|
| void ScreenOrientationObserver::SendStartMessage() {
|
| - RenderThread::Get()->Send(new ScreenOrientationHostMsg_StartListening());
|
| + GetScreenOrientationAccurate()->StartListening();
|
| }
|
|
|
| void ScreenOrientationObserver::SendStopMessage() {
|
| - RenderThread::Get()->Send(new ScreenOrientationHostMsg_StopListening());
|
| + GetScreenOrientationAccurate()->StopListening();
|
| +}
|
| +
|
| +device::mojom::ScreenOrientationAccurate*
|
| +ScreenOrientationObserver::GetScreenOrientationAccurate() {
|
| + if (!screen_orientation_accurate_) {
|
| + RenderThreadImpl::current()->GetChannel()->GetRemoteAssociatedInterface(
|
| + &screen_orientation_accurate_);
|
| + }
|
| + return screen_orientation_accurate_.get();
|
| }
|
|
|
| } // namespace content
|
|
|