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

Side by Side Diff: chrome/browser/tab_contents/chrome_web_contents_view_delegate_mac.mm

Issue 10073014: Add more functionality to WebView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/browser/tab_contents/chrome_web_contents_view_delegate_mac.h" 5 #import "chrome/browser/tab_contents/chrome_web_contents_view_delegate_mac.h"
6 6
7 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegat e.h" 7 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegat e.h"
8 #include "chrome/browser/tab_contents/render_view_context_menu_mac.h" 8 #include "chrome/browser/tab_contents/render_view_context_menu_mac.h"
9 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_mac.h" 9 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_mac.h"
10 #import "chrome/browser/ui/cocoa/view_id_util.h"
11 #include "content/public/browser/render_widget_host_view.h" 10 #include "content/public/browser/render_widget_host_view.h"
12 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
13 12
14 namespace chrome_web_contents_view_delegate_mac { 13 namespace chrome_web_contents_view_delegate_mac {
15 content::WebContentsViewDelegate* CreateWebContentsViewDelegateMac( 14 content::WebContentsViewDelegate* CreateWebContentsViewDelegateMac(
16 content::WebContents* web_contents) { 15 content::WebContents* web_contents) {
17 return new ChromeWebContentsViewDelegateMac(web_contents); 16 return new ChromeWebContentsViewDelegateMac(web_contents);
18 } 17 }
19 } 18 }
20 19
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 web_contents_->GetRenderWidgetHostView(); 51 web_contents_->GetRenderWidgetHostView();
53 if (widget_view && widget_view->IsShowingContextMenu()) 52 if (widget_view && widget_view->IsShowingContextMenu())
54 return; 53 return;
55 54
56 context_menu_.reset( 55 context_menu_.reset(
57 new RenderViewContextMenuMac(web_contents_, 56 new RenderViewContextMenuMac(web_contents_,
58 params, 57 params,
59 web_contents_->GetContentNativeView())); 58 web_contents_->GetContentNativeView()));
60 context_menu_->Init(); 59 context_menu_->Init();
61 } 60 }
62
63 void ChromeWebContentsViewDelegateMac::NativeViewCreated(NSView* view) {
64 view_id_util::SetID(view, VIEW_ID_TAB_CONTAINER);
65 }
66
67 void ChromeWebContentsViewDelegateMac::NativeViewDestroyed(NSView* view) {
68 view_id_util::UnsetID(view);
69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698