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

Side by Side Diff: webkit/tools/test_shell/test_shell_mac.mm

Issue 149620: Use WebWidget from the WebKit API. This change also makes... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « webkit/tools/test_shell/test_shell_gtk.cc ('k') | webkit/tools/test_shell/test_shell_main.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) 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/string_piece.h" 26 #include "base/string_piece.h"
27 #include "base/string_util.h" 27 #include "base/string_util.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 "webkit/glue/webframe.h" 32 #include "webkit/glue/webframe.h"
33 #include "webkit/glue/webkit_glue.h" 33 #include "webkit/glue/webkit_glue.h"
34 #include "webkit/glue/webpreferences.h" 34 #include "webkit/glue/webpreferences.h"
35 #include "webkit/glue/webview.h" 35 #include "webkit/glue/webview.h"
36 #include "webkit/glue/webwidget.h"
37 #include "webkit/glue/plugins/plugin_list.h" 36 #include "webkit/glue/plugins/plugin_list.h"
38 #include "webkit/tools/test_shell/mac/test_shell_webview.h" 37 #include "webkit/tools/test_shell/mac/test_shell_webview.h"
39 #include "webkit/tools/test_shell/resource.h" 38 #include "webkit/tools/test_shell/resource.h"
40 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" 39 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
41 #include "webkit/tools/test_shell/test_navigation_controller.h" 40 #include "webkit/tools/test_shell/test_navigation_controller.h"
42 41
43 #include "third_party/skia/include/core/SkBitmap.h" 42 #include "third_party/skia/include/core/SkBitmap.h"
44 43
45 #import "mac/DumpRenderTreePasteboard.h" 44 #import "mac/DumpRenderTreePasteboard.h"
46 45
46 using WebKit::WebWidget;
47
47 #define MAX_LOADSTRING 100 48 #define MAX_LOADSTRING 100
48 49
49 // Sizes for URL bar layout 50 // Sizes for URL bar layout
50 #define BUTTON_HEIGHT 22 51 #define BUTTON_HEIGHT 22
51 #define BUTTON_WIDTH 72 52 #define BUTTON_WIDTH 72
52 #define BUTTON_MARGIN 8 53 #define BUTTON_MARGIN 8
53 #define URLBAR_HEIGHT 32 54 #define URLBAR_HEIGHT 32
54 55
55 // Global Variables: 56 // Global Variables:
56 57
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 DCHECK(windowDelegate); 452 DCHECK(windowDelegate);
452 [windowHandle setDelegate:nil]; 453 [windowHandle setDelegate:nil];
453 [windowDelegate release]; 454 [windowDelegate release];
454 455
455 [windowHandle close]; 456 [windowHandle close];
456 [windowHandle autorelease]; 457 [windowHandle autorelease];
457 } 458 }
458 459
459 WebWidget* TestShell::CreatePopupWidget(WebView* webview) { 460 WebWidget* TestShell::CreatePopupWidget(WebView* webview) {
460 DCHECK(!m_popupHost); 461 DCHECK(!m_popupHost);
461 m_popupHost = WebWidgetHost::Create(webViewWnd(), delegate_.get()); 462 m_popupHost = WebWidgetHost::Create(webViewWnd(), popup_delegate_.get());
462 463
463 return m_popupHost->webwidget(); 464 return m_popupHost->webwidget();
464 } 465 }
465 466
466 void TestShell::ClosePopup() { 467 void TestShell::ClosePopup() {
467 // PostMessage(popupWnd(), WM_CLOSE, 0, 0); 468 // PostMessage(popupWnd(), WM_CLOSE, 0, 0);
468 m_popupHost = NULL; 469 m_popupHost = NULL;
469 } 470 }
470 471
471 void TestShell::SizeTo(int width, int height) { 472 void TestShell::SizeTo(int width, int height) {
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 return false; 709 return false;
709 } 710 }
710 711
711 void DidLoadPlugin(const std::string& filename) { 712 void DidLoadPlugin(const std::string& filename) {
712 } 713 }
713 714
714 void DidUnloadPlugin(const std::string& filename) { 715 void DidUnloadPlugin(const std::string& filename) {
715 } 716 }
716 717
717 } // namespace webkit_glue 718 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell_gtk.cc ('k') | webkit/tools/test_shell/test_shell_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698