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

Side by Side Diff: webkit/tools/test_shell/mac/test_webview_delegate.mm

Issue 5996003: Revert "Revert 69755 - Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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
« no previous file with comments | « webkit/support/webkit_support_glue.cc ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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 #include "webkit/tools/test_shell/test_webview_delegate.h" 5 #include "webkit/tools/test_shell/test_webview_delegate.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" 10 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h"
11 #include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h" 11 #include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h"
12 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" 12 #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
13 #include "webkit/glue/webcursor.h" 13 #include "webkit/glue/webcursor.h"
14 #include "webkit/glue/plugins/plugin_list.h"
15 #include "webkit/glue/plugins/webplugin_delegate_impl.h"
16 #include "webkit/glue/webmenurunner_mac.h" 14 #include "webkit/glue/webmenurunner_mac.h"
15 #include "webkit/plugins/npapi/plugin_list.h"
16 #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
17 #include "webkit/tools/test_shell/test_shell.h" 17 #include "webkit/tools/test_shell/test_shell.h"
18 18
19 using WebKit::WebCursorInfo; 19 using WebKit::WebCursorInfo;
20 using WebKit::WebNavigationPolicy; 20 using WebKit::WebNavigationPolicy;
21 using WebKit::WebPopupMenu; 21 using WebKit::WebPopupMenu;
22 using WebKit::WebPopupMenuInfo; 22 using WebKit::WebPopupMenuInfo;
23 using WebKit::WebRect; 23 using WebKit::WebRect;
24 using WebKit::WebWidget; 24 using WebKit::WebWidget;
25 25
26 // WebViewClient -------------------------------------------------------------- 26 // WebViewClient --------------------------------------------------------------
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 return gfx::Rect(NSRectToCGRect(resize_rect)); 162 return gfx::Rect(NSRectToCGRect(resize_rect));
163 } 163 }
164 164
165 void TestWebViewDelegate::runModal() { 165 void TestWebViewDelegate::runModal() {
166 NOTIMPLEMENTED(); 166 NOTIMPLEMENTED();
167 } 167 }
168 168
169 // WebPluginPageDelegate ------------------------------------------------------ 169 // WebPluginPageDelegate ------------------------------------------------------
170 170
171 webkit_glue::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate( 171 webkit::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
172 const FilePath& path, 172 const FilePath& path,
173 const std::string& mime_type) { 173 const std::string& mime_type) {
174 WebWidgetHost *host = GetWidgetHost(); 174 WebWidgetHost *host = GetWidgetHost();
175 if (!host) 175 if (!host)
176 return NULL; 176 return NULL;
177 177
178 gfx::PluginWindowHandle containing_view = NULL; 178 gfx::PluginWindowHandle containing_view = NULL;
179 return WebPluginDelegateImpl::Create(path, mime_type, containing_view); 179 return webkit::npapi::WebPluginDelegateImpl::Create(
180 path, mime_type, containing_view);
180 } 181 }
181 182
182 void TestWebViewDelegate::CreatedPluginWindow( 183 void TestWebViewDelegate::CreatedPluginWindow(
183 gfx::PluginWindowHandle handle) { 184 gfx::PluginWindowHandle handle) {
184 } 185 }
185 186
186 void TestWebViewDelegate::WillDestroyPluginWindow( 187 void TestWebViewDelegate::WillDestroyPluginWindow(
187 gfx::PluginWindowHandle handle) { 188 gfx::PluginWindowHandle handle) {
188 } 189 }
189 190
190 void TestWebViewDelegate::DidMovePlugin( 191 void TestWebViewDelegate::DidMovePlugin(
191 const webkit_glue::WebPluginGeometry& move) { 192 const webkit::npapi::WebPluginGeometry& move) {
192 // TODO(port): add me once plugins work. 193 // TODO(port): add me once plugins work.
193 } 194 }
194 195
195 // Public methods ------------------------------------------------------------- 196 // Public methods -------------------------------------------------------------
196 197
197 void TestWebViewDelegate::UpdateSelectionClipboard(bool is_empty_selection) { 198 void TestWebViewDelegate::UpdateSelectionClipboard(bool is_empty_selection) {
198 // No selection clipboard on mac, do nothing. 199 // No selection clipboard on mac, do nothing.
199 } 200 }
200 201
201 // Private methods ------------------------------------------------------------ 202 // Private methods ------------------------------------------------------------
(...skipping 12 matching lines...) Expand all
214 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) { 215 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) {
215 [[shell_->webViewHost()->view_handle() window] 216 [[shell_->webViewHost()->view_handle() window]
216 setTitle:[NSString stringWithUTF8String:WideToUTF8(title).c_str()]]; 217 setTitle:[NSString stringWithUTF8String:WideToUTF8(title).c_str()]];
217 } 218 }
218 219
219 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { 220 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) {
220 const char* frameURL = url.spec().c_str(); 221 const char* frameURL = url.spec().c_str();
221 NSString *address = [NSString stringWithUTF8String:frameURL]; 222 NSString *address = [NSString stringWithUTF8String:frameURL];
222 [shell_->editWnd() setStringValue:address]; 223 [shell_->editWnd() setStringValue:address];
223 } 224 }
OLDNEW
« no previous file with comments | « webkit/support/webkit_support_glue.cc ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698