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

Side by Side Diff: content/public/browser/screen_orientation_provider.cc

Issue 546453004: Centralize ScreenOrientationProvider logic, add platform delegates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screen_orientation_public_impl_split
Patch Set: Created 6 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/public/browser/screen_orientation_provider.h"
6
7 #include "content/public/browser/screen_orientation_provider_factory.h"
8
9 namespace content {
10
11 ScreenOrientationProviderFactory* ScreenOrientationProvider::factory_ = NULL;
12
13 ScreenOrientationProvider*
14 ScreenOrientationProvider::ScreenOrientationProvider::Create(
mlamouri (slow - plz ping) 2014/09/16 20:21:04 isn't there one ScreenOrientationProvider too many
jonross 2014/09/16 21:48:13 Yeah... not sure why it didn't complain
15 ScreenOrientationDispatcherHost* dispatcher_host,
16 WebContents* web_contents) {
17 if (factory_)
18 return factory_->Create(dispatcher_host, web_contents);
19 return NULL;
mlamouri (slow - plz ping) 2014/09/16 20:21:04 nit: I would do: if (!factory_) return NULL; ret
jonross 2014/09/16 21:48:13 Done.
20 }
21
22 void ScreenOrientationProvider::SetFactory(
23 ScreenOrientationProviderFactory* factory) {
24 factory_ = factory;
25 }
26
27 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698