| Index: content/renderer/screen_orientation/screen_orientation_dispatcher.h
|
| diff --git a/content/renderer/screen_orientation/screen_orientation_dispatcher.h b/content/renderer/screen_orientation/screen_orientation_dispatcher.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2b1c1911fd87f5e0622ad74a86511a2a0844b5e1
|
| --- /dev/null
|
| +++ b/content/renderer/screen_orientation/screen_orientation_dispatcher.h
|
| @@ -0,0 +1,41 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_RENDERER_SCREEN_ORIENTATION_DISPATCHER_H_
|
| +#define CONTENT_RENDERER_SCREEN_ORIENTATION_DISPATCHER_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "content/public/renderer/render_process_observer.h"
|
| +
|
| +namespace blink {
|
| +class WebScreenOrientationListener;
|
| +}
|
| +
|
| +namespace content {
|
| +
|
| +class RenderThread;
|
| +
|
| +// ScreenOrientationDispatcher listens to message from the browser process and
|
| +// dispatch the orientation change ones to the WebScreenOrientationListener.
|
| +class ScreenOrientationDispatcher : public RenderProcessObserver {
|
| + public:
|
| + explicit ScreenOrientationDispatcher(RenderThread*);
|
| + virtual ~ScreenOrientationDispatcher() {}
|
| +
|
| + // RenderProcessObserver
|
| + virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
|
| +
|
| + void setListener(blink::WebScreenOrientationListener*);
|
| +
|
| + private:
|
| + void OnOrientationChange(int orientation);
|
| +
|
| + blink::WebScreenOrientationListener* listener_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcher);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_RENDERER_SCREEN_ORIENTATION_DISPATCHER_H_
|
|
|