Roll src/third_party/WebKit d10c917:a1123a1 (svn 198729:198730)
[chromium-blink-merge.git] / content / renderer / screen_orientation / screen_orientation_observer.cc
blob8cb05fe386946bf7b154cd951bc6bd7a35d12d6c
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/renderer/screen_orientation/screen_orientation_observer.h"
7 #include "content/common/screen_orientation_messages.h"
9 namespace content {
11 ScreenOrientationObserver::ScreenOrientationObserver() {
14 ScreenOrientationObserver::~ScreenOrientationObserver() {
15 StopIfObserving();
18 void ScreenOrientationObserver::Start(
19 blink::WebPlatformEventListener* listener) {
20 // This should never be called with a proper listener.
21 CHECK(listener == 0);
22 PlatformEventObserver<blink::WebPlatformEventListener>::Start(0);
25 void ScreenOrientationObserver::SendStartMessage() {
26 RenderThread::Get()->Send(new ScreenOrientationHostMsg_StartListening());
29 void ScreenOrientationObserver::SendStopMessage() {
30 RenderThread::Get()->Send(new ScreenOrientationHostMsg_StopListening());
33 } // namespace content