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 3// found in the LICENSE file. 4 5#ifndef CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_ORIENTATION_MESSAGE_FILTER_H_ 6#define CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_ORIENTATION_MESSAGE_FILTER_H_ 7 8#include "base/compiler_specific.h" 9#include "content/public/browser/browser_message_filter.h" 10 11namespace content { 12 13class RenderProcessHost; 14 15class DeviceOrientationMessageFilter : public BrowserMessageFilter { 16 public: 17 DeviceOrientationMessageFilter(); 18 19 // BrowserMessageFilter implementation. 20 virtual bool OnMessageReceived(const IPC::Message& message, 21 bool* message_was_ok) OVERRIDE; 22 23 private: 24 virtual ~DeviceOrientationMessageFilter(); 25 26 void OnDeviceOrientationStartPolling(); 27 void OnDeviceOrientationStopPolling(); 28 void DidStartDeviceOrientationPolling(); 29 30 bool is_started_; 31 32 DISALLOW_COPY_AND_ASSIGN(DeviceOrientationMessageFilter); 33}; 34 35} // namespace content 36 37#endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_ORIENTATION_MESSAGE_FILTER_H_ 38