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

Side by Side Diff: content/renderer/screen_orientation/screen_orientation_dispatcher.cc

Issue 327573002: Properly route screen orientation IPC messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screen_lock_view
Patch Set: review comments Created 6 years, 6 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
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/renderer/screen_orientation/screen_orientation_dispatcher.h" 5 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h"
6 6
7 #include "content/common/screen_orientation_messages.h" 7 #include "content/common/screen_orientation_messages.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 pending_callbacks_.Remove(iterator.GetCurrentKey()); 62 pending_callbacks_.Remove(iterator.GetCurrentKey());
63 } 63 }
64 } 64 }
65 65
66 void ScreenOrientationDispatcher::lockOrientation( 66 void ScreenOrientationDispatcher::lockOrientation(
67 blink::WebScreenOrientationLockType orientation, 67 blink::WebScreenOrientationLockType orientation,
68 blink::WebLockOrientationCallback* callback) { 68 blink::WebLockOrientationCallback* callback) {
69 CancelPendingLocks(); 69 CancelPendingLocks();
70 70
71 int request_id = pending_callbacks_.Add(callback); 71 int request_id = pending_callbacks_.Add(callback);
72 Send(new ScreenOrientationHostMsg_LockRequest(orientation, request_id)); 72 Send(new ScreenOrientationHostMsg_LockRequest(
73 routing_id(), orientation, request_id));
73 } 74 }
74 75
75 void ScreenOrientationDispatcher::unlockOrientation() { 76 void ScreenOrientationDispatcher::unlockOrientation() {
76 CancelPendingLocks(); 77 CancelPendingLocks();
77 Send(new ScreenOrientationHostMsg_Unlock); 78 Send(new ScreenOrientationHostMsg_Unlock(routing_id()));
78 } 79 }
79 80
80 } // namespace content 81 } // namespace content
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698