| 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..4549d98acaff77358350b66d4890f68cdbd4f548 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());
|
| + GetScreenOrientationListener()->Start();
|
| }
|
|
|
| void ScreenOrientationObserver::SendStopMessage() {
|
| - RenderThread::Get()->Send(new ScreenOrientationHostMsg_StopListening());
|
| + GetScreenOrientationListener()->Stop();
|
| +}
|
| +
|
| +device::mojom::ScreenOrientationListener*
|
| +ScreenOrientationObserver::GetScreenOrientationListener() {
|
| + if (!listener_) {
|
| + RenderThreadImpl::current()->GetChannel()->GetRemoteAssociatedInterface(
|
| + &listener_);
|
| + }
|
| + return listener_.get();
|
| }
|
|
|
| } // namespace content
|
|
|