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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm

Issue 489763002: MacViews: Gets a webview working in views_examples_with_content_exe Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to master Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
diff --git a/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm b/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
index 3e6d73c9b6332492af68161a037762945c59affc..99a9a45effb5aa7dc06fe499e603f002e39e5293 100644
--- a/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
@@ -41,6 +41,11 @@ void ChromeWebContentsViewDelegateMac::ShowContextMenu(
params));
}
+content::WebContentsViewDelegateMac*
+ChromeWebContentsViewDelegateMac::AsWebContentsViewDelegateMac() {
+ return this;
+}
+
void ChromeWebContentsViewDelegateMac::ShowMenu(
scoped_ptr<RenderViewContextMenu> menu) {
context_menu_.reset(static_cast<RenderViewContextMenuMac*>(menu.release()));
@@ -90,9 +95,12 @@ ChromeWebContentsViewDelegateMac::GetActiveRenderWidgetHostView() {
namespace chrome {
+#if !defined(TOOLKIT_VIEWS)
content::WebContentsViewDelegate* CreateWebContentsViewDelegate(
- content::WebContents* web_contents) {
+ content::WebContents* web_contents,
+ gfx::NativeView context) {
return new ChromeWebContentsViewDelegateMac(web_contents);
}
+#endif // !defined(TOOLKIT_VIEWS)
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698