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

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

Issue 2564653003: [DeviceService] Move screen_orientation.mojom from //content to //device. (Closed)
Patch Set: Address nits from blundell@ Created 4 years 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
« no previous file with comments | « content/browser/screen_orientation/screen_orientation.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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.h" 5 #include "content/browser/screen_orientation/screen_orientation.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "content/public/browser/navigation_details.h" 9 #include "content/public/browser/navigation_details.h"
10 #include "content/public/browser/screen_orientation_provider.h" 10 #include "content/public/browser/screen_orientation_provider.h"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 using LockResult = blink::mojom::ScreenOrientationLockResult; 15 using LockResult = device::mojom::ScreenOrientationLockResult;
16 16
17 ScreenOrientation::ScreenOrientation(WebContents* web_contents) 17 ScreenOrientation::ScreenOrientation(WebContents* web_contents)
18 : WebContentsObserver(web_contents), 18 : WebContentsObserver(web_contents),
19 bindings_(web_contents, this), 19 bindings_(web_contents, this),
20 weak_factory_(this) { 20 weak_factory_(this) {
21 provider_.reset(new ScreenOrientationProvider(web_contents)); 21 provider_.reset(new ScreenOrientationProvider(web_contents));
22 } 22 }
23 23
24 ScreenOrientation::~ScreenOrientation() = default; 24 ScreenOrientation::~ScreenOrientation() = default;
25 25
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return; 57 return;
58 58
59 base::ResetAndReturn(&on_result_callback_).Run(result); 59 base::ResetAndReturn(&on_result_callback_).Run(result);
60 } 60 }
61 61
62 ScreenOrientationProvider* ScreenOrientation::GetScreenOrientationProvider() { 62 ScreenOrientationProvider* ScreenOrientation::GetScreenOrientationProvider() {
63 return provider_.get(); 63 return provider_.get();
64 } 64 }
65 65
66 } // namespace content 66 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/screen_orientation/screen_orientation.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698