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

Side by Side Diff: webkit/tools/test_shell/test_shell_mac.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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 <ApplicationServices/ApplicationServices.h> 5 #include <ApplicationServices/ApplicationServices.h>
6 #import <Cocoa/Cocoa.h> 6 #import <Cocoa/Cocoa.h>
7 #import <objc/objc-runtime.h> 7 #import <objc/objc-runtime.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 9
10 #include "webkit/tools/test_shell/test_shell.h" 10 #include "webkit/tools/test_shell/test_shell.h"
(...skipping 15 matching lines...) Expand all
26 #include "base/utf_string_conversions.h" 26 #include "base/utf_string_conversions.h"
27 #include "gfx/size.h" 27 #include "gfx/size.h"
28 #include "grit/webkit_resources.h" 28 #include "grit/webkit_resources.h"
29 #include "net/base/mime_util.h" 29 #include "net/base/mime_util.h"
30 #include "skia/ext/bitmap_platform_device.h" 30 #include "skia/ext/bitmap_platform_device.h"
31 #include "testing/gtest/include/gtest/gtest.h" 31 #include "testing/gtest/include/gtest/gtest.h"
32 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" 32 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
33 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" 33 #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
34 #include "webkit/glue/webkit_glue.h" 34 #include "webkit/glue/webkit_glue.h"
35 #include "webkit/glue/webpreferences.h" 35 #include "webkit/glue/webpreferences.h"
36 #include "webkit/glue/plugins/plugin_list.h" 36 #include "webkit/plugins/npapi/plugin_list.h"
37 #include "webkit/tools/test_shell/mac/test_shell_webview.h" 37 #include "webkit/tools/test_shell/mac/test_shell_webview.h"
38 #include "webkit/tools/test_shell/resource.h" 38 #include "webkit/tools/test_shell/resource.h"
39 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" 39 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
40 #include "webkit/tools/test_shell/test_navigation_controller.h" 40 #include "webkit/tools/test_shell/test_navigation_controller.h"
41 #include "webkit/tools/test_shell/test_webview_delegate.h" 41 #include "webkit/tools/test_shell/test_webview_delegate.h"
42 42
43 #include "third_party/skia/include/core/SkBitmap.h" 43 #include "third_party/skia/include/core/SkBitmap.h"
44 44
45 #import "mac/DumpRenderTreePasteboard.h" 45 #import "mac/DumpRenderTreePasteboard.h"
46 46
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 // Add <app bundle's parent dir>/plugins to the plugin path so we can load 246 // Add <app bundle's parent dir>/plugins to the plugin path so we can load
247 // test plugins. 247 // test plugins.
248 FilePath plugins_dir; 248 FilePath plugins_dir;
249 PathService::Get(base::DIR_EXE, &plugins_dir); 249 PathService::Get(base::DIR_EXE, &plugins_dir);
250 if (mac_util::AmIBundled()) { 250 if (mac_util::AmIBundled()) {
251 plugins_dir = plugins_dir.AppendASCII("../../../plugins"); 251 plugins_dir = plugins_dir.AppendASCII("../../../plugins");
252 } else { 252 } else {
253 plugins_dir = plugins_dir.AppendASCII("plugins"); 253 plugins_dir = plugins_dir.AppendASCII("plugins");
254 } 254 }
255 NPAPI::PluginList::Singleton()->AddExtraPluginDir(plugins_dir); 255 webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(plugins_dir);
256 } 256 }
257 257
258 NSButton* MakeTestButton(NSRect* rect, NSString* title, NSView* parent) { 258 NSButton* MakeTestButton(NSRect* rect, NSString* title, NSView* parent) {
259 NSButton* button = [[[NSButton alloc] initWithFrame:*rect] autorelease]; 259 NSButton* button = [[[NSButton alloc] initWithFrame:*rect] autorelease];
260 [button setTitle:title]; 260 [button setTitle:title];
261 [button setBezelStyle:NSSmallSquareBezelStyle]; 261 [button setBezelStyle:NSSmallSquareBezelStyle];
262 [button setAutoresizingMask:(NSViewMaxXMargin | NSViewMinYMargin)]; 262 [button setAutoresizingMask:(NSViewMaxXMargin | NSViewMinYMargin)];
263 [parent addSubview:button]; 263 [parent addSubview:button];
264 rect->origin.x += BUTTON_WIDTH; 264 rect->origin.x += BUTTON_WIDTH;
265 return button; 265 return button;
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 return false; 735 return false;
736 } 736 }
737 737
738 void DidLoadPlugin(const std::string& filename) { 738 void DidLoadPlugin(const std::string& filename) {
739 } 739 }
740 740
741 void DidUnloadPlugin(const std::string& filename) { 741 void DidUnloadPlugin(const std::string& filename) {
742 } 742 }
743 743
744 } // namespace webkit_glue 744 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell.gypi ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698