Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1900)

Unified Diff: content/browser/screen_orientation/screen_orientation_listener_android.cc

Issue 2688383002: [ScreenOrientation] Merge mojo interface ScreenOrientationListener into ScreenOrientation
Patch Set: Address comments from mlamouri@ Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/screen_orientation/screen_orientation_listener_android.cc
diff --git a/content/browser/screen_orientation/screen_orientation_listener_android.cc b/content/browser/screen_orientation/screen_orientation_listener_android.cc
deleted file mode 100644
index 850e89e5b9fb509d99fb202917a7658d8337794a..0000000000000000000000000000000000000000
--- a/content/browser/screen_orientation/screen_orientation_listener_android.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// 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.
-
-#include "content/browser/screen_orientation/screen_orientation_listener_android.h"
-
-#include "base/message_loop/message_loop.h"
-#include "content/browser/screen_orientation/screen_orientation_delegate_android.h"
-#include "content/common/screen_orientation_messages.h"
-
-namespace content {
-
-ScreenOrientationListenerAndroid::ScreenOrientationListenerAndroid()
- : BrowserMessageFilter(ScreenOrientationMsgStart),
- BrowserAssociatedInterface<device::mojom::ScreenOrientationListener>(
- this,
- this),
- listeners_count_(0) {}
-
-ScreenOrientationListenerAndroid::~ScreenOrientationListenerAndroid() {
- DCHECK(base::MessageLoopForIO::IsCurrent());
- if (listeners_count_ > 0)
- ScreenOrientationDelegateAndroid::StopAccurateListening();
-}
-
-bool ScreenOrientationListenerAndroid::OnMessageReceived(
- const IPC::Message& message) {
- return false;
-}
-
-void ScreenOrientationListenerAndroid::Start() {
- DCHECK(base::MessageLoopForIO::IsCurrent());
- ++listeners_count_;
- if (listeners_count_ == 1)
- ScreenOrientationDelegateAndroid::StartAccurateListening();
-}
-
-void ScreenOrientationListenerAndroid::Stop() {
- DCHECK(base::MessageLoopForIO::IsCurrent());
- DCHECK(listeners_count_ > 0);
- --listeners_count_;
- if (listeners_count_ == 0)
- ScreenOrientationDelegateAndroid::StopAccurateListening();
-}
-
-} // namespace content

Powered by Google App Engine
This is Rietveld 408576698