MacViews: Guard Objective-C bits in content::WebContentsViewDelegate with __OBJC__
commit1914f8eaacd794447cb5e35d4e6628b9761b9ebe
authortapted <tapted@chromium.org>
Thu, 28 Aug 2014 08:25:47 +0000 (28 01:25 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 28 Aug 2014 08:26:38 +0000 (28 08:26 +0000)
tree06434daa886e3d37fafc39264afe04bd6f419ad7
parent8fc5ed50a6a5908953285b10f786ef8f580f360d
MacViews: Guard Objective-C bits in content::WebContentsViewDelegate with __OBJC__

Currently WebContentsViewDelegate has a mix of ObjectiveC and C++ code
guarded by #ifdef OS_MACOSX. This means, on Mac, it can only be included
in .mm files.

For views on Mac, we want to reuse the toolkit-views WCVD (and tests)
when hosting a WebContents in a views::Widget. So we can't convert
everything to .mm.

This CL changes the guards to use __OBJC__ and ensures the vtable is a
consistent size with the compile flags used on MacViews.

To reduce churn, the WCVD methods are given default implementations.
MacViews needs the other methods, currently guarded by USE_AURA, so
things get really complex without this.

BUG=399191

Review URL: https://codereview.chromium.org/507363002

Cr-Commit-Position: refs/heads/master@{#292349}
android_webview/native/aw_web_contents_view_delegate.h
athena/content/web_contents_view_delegate_factory_impl.cc
content/content_browser.gypi
content/public/browser/web_contents_view_delegate.cc [new file with mode: 0644]
content/public/browser/web_contents_view_delegate.h
content/shell/browser/shell_web_contents_view_delegate.h
content/shell/browser/shell_web_contents_view_delegate_android.cc
content/shell/browser/shell_web_contents_view_delegate_mac.mm
content/shell/browser/shell_web_contents_view_delegate_win.cc