Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 @class NSWindow; | 36 @class NSWindow; |
| 37 #else | 37 #else |
| 38 class WKView; | 38 class WKView; |
| 39 class NSWindow; | 39 class NSWindow; |
| 40 #endif | 40 #endif |
| 41 typedef WKView *PlatformWKView; | 41 typedef WKView *PlatformWKView; |
| 42 typedef NSWindow *PlatformWindow; | 42 typedef NSWindow *PlatformWindow; |
| 43 #elif defined(WIN32) || defined(_WIN32) | 43 #elif defined(WIN32) || defined(_WIN32) |
| 44 typedef WKViewRef PlatformWKView; | 44 typedef WKViewRef PlatformWKView; |
| 45 typedef HWND PlatformWindow; | 45 typedef HWND PlatformWindow; |
| 46 #elif PLATFORM(GTK) | |
| 47 typedef WKViewRef PlatformWKView; | |
| 48 typedef GtkWidget *PlatformWindow; | |
| 49 #elif PLATFORM(EFL) | |
| 50 typedef struct _Ecore_Evas Ecore_Evas; | |
| 51 #if USE(EO) | |
| 52 typedef struct _Eo Evas_Object; | |
| 53 #else | |
| 54 typedef struct _Evas_Object Evas_Object; | |
| 55 #endif | |
| 56 typedef Evas_Object* PlatformWKView; | |
| 57 typedef Ecore_Evas* PlatformWindow; | |
| 58 #elif PLATFORM(QT) | |
| 59 QT_BEGIN_NAMESPACE | |
| 60 class QQuickView; | |
| 61 QT_END_NAMESPACE | |
| 62 class QQuickWebView; | |
| 63 typedef QQuickWebView* PlatformWKView; | |
| 64 typedef QQuickView* PlatformWindow; | |
| 65 #endif | 46 #endif |
| 66 | 47 |
| 67 namespace TestWebKitAPI { | 48 namespace TestWebKitAPI { |
| 68 | 49 |
| 69 #if PLATFORM(WIN) | |
| 70 class WindowMessageObserver; | |
| 71 #endif | |
| 72 | |
| 73 class PlatformWebView { | 50 class PlatformWebView { |
| 74 public: | 51 public: |
| 75 PlatformWebView(WKContextRef, WKPageGroupRef = 0); | 52 PlatformWebView(WKContextRef, WKPageGroupRef = 0); |
| 76 ~PlatformWebView(); | 53 ~PlatformWebView(); |
| 77 | 54 |
| 78 WKPageRef page() const; | 55 WKPageRef page() const; |
|
abarth-chromium
2013/04/20 22:46:20
I'm sure we can remove this entire header.
| |
| 79 PlatformWKView platformView() const { return m_view; } | 56 PlatformWKView platformView() const { return m_view; } |
| 80 void resizeTo(unsigned width, unsigned height); | 57 void resizeTo(unsigned width, unsigned height); |
| 81 void focus(); | 58 void focus(); |
| 82 | 59 |
| 83 void simulateSpacebarKeyPress(); | 60 void simulateSpacebarKeyPress(); |
| 84 void simulateAltKeyPress(); | 61 void simulateAltKeyPress(); |
| 85 void simulateRightClick(unsigned x, unsigned y); | 62 void simulateRightClick(unsigned x, unsigned y); |
| 86 void simulateMouseMove(unsigned x, unsigned y); | 63 void simulateMouseMove(unsigned x, unsigned y); |
| 87 | 64 |
| 88 #if PLATFORM(WIN) | |
| 89 void simulateAKeyDown(); | |
| 90 void setParentWindowMessageObserver(WindowMessageObserver* observer) { m_par entWindowMessageObserver = observer; } | |
| 91 #endif | |
| 92 | |
| 93 private: | 65 private: |
| 94 #if PLATFORM(WIN) | |
| 95 static void registerWindowClass(); | |
| 96 static LRESULT CALLBACK wndProc(HWND, UINT message, WPARAM, LPARAM); | |
| 97 #endif | |
| 98 | |
| 99 PlatformWKView m_view; | 66 PlatformWKView m_view; |
| 100 PlatformWindow m_window; | 67 PlatformWindow m_window; |
| 101 | |
| 102 #if PLATFORM(WIN) | |
| 103 WindowMessageObserver* m_parentWindowMessageObserver; | |
| 104 #endif | |
| 105 }; | 68 }; |
| 106 | 69 |
| 107 } // namespace TestWebKitAPI | 70 } // namespace TestWebKitAPI |
| 108 | 71 |
| 109 #endif // PlatformWebView_h | 72 #endif // PlatformWebView_h |
| OLD | NEW |