| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/device_orientation/message_filter.h" | 5 #include "content/browser/device_orientation/message_filter.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "content/browser/device_orientation/orientation.h" | 8 #include "content/browser/device_orientation/orientation.h" |
| 9 #include "content/browser/device_orientation/provider.h" | 9 #include "content/browser/device_orientation/provider.h" |
| 10 #include "content/browser/renderer_host/render_view_host.h" | 10 #include "content/browser/renderer_host/render_view_host.h" |
| 11 #include "content/browser/renderer_host/render_view_host_notification_task.h" | 11 #include "content/browser/renderer_host/render_view_host_notification_task.h" |
| 12 #include "content/common/device_orientation_messages.h" | 12 #include "content/common/device_orientation_messages.h" |
| 13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 14 | 14 |
| 15 using content::BrowserThread; |
| 16 |
| 15 namespace device_orientation { | 17 namespace device_orientation { |
| 16 | 18 |
| 17 MessageFilter::MessageFilter() : provider_(NULL) { | 19 MessageFilter::MessageFilter() : provider_(NULL) { |
| 18 } | 20 } |
| 19 | 21 |
| 20 MessageFilter::~MessageFilter() { | 22 MessageFilter::~MessageFilter() { |
| 21 } | 23 } |
| 22 | 24 |
| 23 class MessageFilter::ObserverDelegate | 25 class MessageFilter::ObserverDelegate |
| 24 : public base::RefCounted<ObserverDelegate>, public Provider::Observer { | 26 : public base::RefCounted<ObserverDelegate>, public Provider::Observer { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 this); | 95 this); |
| 94 } | 96 } |
| 95 | 97 |
| 96 void MessageFilter::OnStopUpdating(int render_view_id) { | 98 void MessageFilter::OnStopUpdating(int render_view_id) { |
| 97 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 99 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 98 | 100 |
| 99 observers_map_.erase(render_view_id); | 101 observers_map_.erase(render_view_id); |
| 100 } | 102 } |
| 101 | 103 |
| 102 } // namespace device_orientation | 104 } // namespace device_orientation |
| OLD | NEW |