Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[Tizen][Temp] Fix ScreenOrientationProvider::Create multiple defined
Browse files Browse the repository at this point in the history
This commit fixes ScreenOrientationProvider::Create() to be defined multiple
times error. Meanwhile, add ScreenOrientationDispatcherHost::SetProvider so that
tizen can use this inferface to bridge with ScreenOrientationDispatcherHost.

Upstream bug https://code.google.com/p/chromium/issues/detail?id=408573 to trace this problem.
Send https://codereview.chromium.org/513073002/ to solve it.

CL: https://codereview.chromium.org/338373002
  • Loading branch information
qjia7 committed Aug 29, 2014
1 parent 463a6c3 commit dc9ba1e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ void ScreenOrientationDispatcherHost::OnOrientationChange() {
provider_->OnOrientationChange();
}

void ScreenOrientationDispatcherHost::SetProvider(
ScreenOrientationProvider* provider) {
provider_.reset(provider);
}

void ScreenOrientationDispatcherHost::OnLockRequest(
RenderFrameHost* render_frame_host,
blink::WebScreenOrientationLockType orientation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class CONTENT_EXPORT ScreenOrientationDispatcherHost

void OnOrientationChange();

void SetProvider(ScreenOrientationProvider* provider);

private:
void OnLockRequest(RenderFrameHost* render_frame_host,
blink::WebScreenOrientationLockType orientation,
Expand Down
18 changes: 18 additions & 0 deletions content/browser/screen_orientation/screen_orientation_provider.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/screen_orientation/screen_orientation_provider.h"

namespace content {

#if !defined(OS_ANDROID)
// static
ScreenOrientationProvider* ScreenOrientationProvider::Create(
ScreenOrientationDispatcherHost* dispatcher_host,
WebContents* web_contents) {
return NULL;
}
#endif // !defined(OS_ANDROID)

} // namespace content
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@ class ScreenOrientationProvider {
DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider);
};

#if !defined(OS_ANDROID)
// static
ScreenOrientationProvider* ScreenOrientationProvider::Create(
ScreenOrientationDispatcherHost* dispatcher_host,
WebContents* web_contents) {
return NULL;
}
#endif // !defined(OS_ANDROID)

} // namespace content

#endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_
1 change: 1 addition & 0 deletions content/content_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,7 @@
'browser/screen_orientation/screen_orientation_dispatcher_host.h',
'browser/screen_orientation/screen_orientation_message_filter_android.h',
'browser/screen_orientation/screen_orientation_message_filter_android.cc',
'browser/screen_orientation/screen_orientation_provider.cc',
'browser/screen_orientation/screen_orientation_provider.h',
'browser/screen_orientation/screen_orientation_provider_android.h',
'browser/screen_orientation/screen_orientation_provider_android.cc',
Expand Down

0 comments on commit dc9ba1e

Please sign in to comment.