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

Side by Side Diff: content/browser/screen_orientation/screen_orientation_dispatcher_host.cc

Issue 292443004: Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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/screen_orientation/screen_orientation_dispatcher_host. h" 5 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host. h"
6 6
7 #include "content/browser/screen_orientation/screen_orientation_provider.h" 7 #include "content/browser/screen_orientation/screen_orientation_provider.h"
8 #include "content/common/screen_orientation_messages.h" 8 #include "content/common/screen_orientation_messages.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 ScreenOrientationDispatcherHost::ScreenOrientationDispatcherHost() 12 ScreenOrientationDispatcherHost::ScreenOrientationDispatcherHost()
13 : BrowserMessageFilter(ScreenOrientationMsgStart) { 13 : BrowserMessageFilter(ScreenOrientationMsgStart) {
14 if (!provider_.get()) 14 if (!provider_.get())
15 provider_.reset(CreateProvider()); 15 provider_.reset(CreateProvider());
16 } 16 }
17 17
18 ScreenOrientationDispatcherHost::~ScreenOrientationDispatcherHost() { 18 ScreenOrientationDispatcherHost::~ScreenOrientationDispatcherHost() {
19 } 19 }
20 20
21 bool ScreenOrientationDispatcherHost::OnMessageReceived( 21 bool ScreenOrientationDispatcherHost::OnMessageReceived(
22 const IPC::Message& message, bool* message_was_ok) { 22 const IPC::Message& message) {
23 bool handled = true; 23 bool handled = true;
24 24
25 IPC_BEGIN_MESSAGE_MAP_EX(ScreenOrientationDispatcherHost, 25 IPC_BEGIN_MESSAGE_MAP(ScreenOrientationDispatcherHost, message)
26 message,
27 *message_was_ok)
28 IPC_MESSAGE_HANDLER(ScreenOrientationHostMsg_Lock, OnLockRequest) 26 IPC_MESSAGE_HANDLER(ScreenOrientationHostMsg_Lock, OnLockRequest)
29 IPC_MESSAGE_HANDLER(ScreenOrientationHostMsg_Unlock, OnUnlockRequest) 27 IPC_MESSAGE_HANDLER(ScreenOrientationHostMsg_Unlock, OnUnlockRequest)
30 IPC_MESSAGE_UNHANDLED(handled = false) 28 IPC_MESSAGE_UNHANDLED(handled = false)
31 IPC_END_MESSAGE_MAP_EX() 29 IPC_END_MESSAGE_MAP()
32 30
33 return handled; 31 return handled;
34 } 32 }
35 33
36 void ScreenOrientationDispatcherHost::OnOrientationChange( 34 void ScreenOrientationDispatcherHost::OnOrientationChange(
37 blink::WebScreenOrientationType orientation) { 35 blink::WebScreenOrientationType orientation) {
38 Send(new ScreenOrientationMsg_OrientationChange(orientation)); 36 Send(new ScreenOrientationMsg_OrientationChange(orientation));
39 } 37 }
40 38
41 void ScreenOrientationDispatcherHost::SetProviderForTests( 39 void ScreenOrientationDispatcherHost::SetProviderForTests(
(...skipping 17 matching lines...) Expand all
59 } 57 }
60 58
61 #if !defined(OS_ANDROID) 59 #if !defined(OS_ANDROID)
62 // static 60 // static
63 ScreenOrientationProvider* ScreenOrientationDispatcherHost::CreateProvider() { 61 ScreenOrientationProvider* ScreenOrientationDispatcherHost::CreateProvider() {
64 return NULL; 62 return NULL;
65 } 63 }
66 #endif 64 #endif
67 65
68 } // namespace content 66 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698