OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "MessageEvent.h" | 38 #include "MessageEvent.h" |
39 #include "MessagePort.h" | 39 #include "MessagePort.h" |
40 #include "MessagePortChannel.h" | 40 #include "MessagePortChannel.h" |
41 #include "ScriptExecutionContext.h" | 41 #include "ScriptExecutionContext.h" |
42 #include "SecurityOrigin.h" | 42 #include "SecurityOrigin.h" |
43 #include "SerializedScriptValue.h" | 43 #include "SerializedScriptValue.h" |
44 #include "SubstituteData.h" | 44 #include "SubstituteData.h" |
45 #include <wtf/MainThread.h> | 45 #include <wtf/MainThread.h> |
46 #include <wtf/Threading.h> | 46 #include <wtf/Threading.h> |
47 | 47 |
48 #include "EmptyWebFrameClientImpl.h" | |
49 #include "PlatformMessagePortChannel.h" | 48 #include "PlatformMessagePortChannel.h" |
50 #include "WebDataSourceImpl.h" | 49 #include "WebDataSourceImpl.h" |
51 #include "WebFrameClient.h" | 50 #include "WebFrameClient.h" |
52 #include "WebMessagePortChannel.h" | 51 #include "WebMessagePortChannel.h" |
53 #include "WebScreenInfo.h" | 52 #include "WebScreenInfo.h" |
54 #include "WebString.h" | 53 #include "WebString.h" |
55 #include "WebURL.h" | 54 #include "WebURL.h" |
56 #include "WebView.h" | 55 #include "WebView.h" |
57 #include "WebWorkerClient.h" | 56 #include "WebWorkerClient.h" |
58 // FIXME: Move following includes to webkit api. | 57 // FIXME: Move following includes to webkit api. |
59 #include "webkit/glue/webframe_impl.h" | 58 #include "webkit/glue/webframe_impl.h" |
60 #include "webkit/glue/webpreferences.h" | 59 #include "webkit/glue/webpreferences.h" |
61 | 60 |
62 using namespace WebCore; | 61 using namespace WebCore; |
63 | 62 |
64 namespace WebKit { | 63 namespace WebKit { |
65 | 64 |
66 #if ENABLE(WORKERS) | 65 #if ENABLE(WORKERS) |
67 | 66 |
68 // Dummy WebViewDelegate - we only need it in Worker process to load a | 67 // Dummy WebViewDelegate - we only need it in Worker process to load a |
69 // 'shadow page' which will initialize WebCore loader. | 68 // 'shadow page' which will initialize WebCore loader. |
70 class WorkerWebFrameClient : public WebKit::EmptyWebFrameClient { | 69 class WorkerWebFrameClient : public WebKit::WebFrameClient { |
71 public: | 70 public: |
72 // Tell the loader to load the data into the 'shadow page' synchronously, | 71 // Tell the loader to load the data into the 'shadow page' synchronously, |
73 // so we can grab the resulting Document right after load. | 72 // so we can grab the resulting Document right after load. |
74 virtual void didCreateDataSource(WebFrame* frame, WebDataSource* ds) | 73 virtual void didCreateDataSource(WebFrame* frame, WebDataSource* ds) |
75 { | 74 { |
76 static_cast<WebDataSourceImpl*>(ds)->setDeferMainResourceDataLoad(false); | 75 static_cast<WebDataSourceImpl*>(ds)->setDeferMainResourceDataLoad(false); |
77 } | 76 } |
78 | 77 |
79 // Lazy allocate and leak this instance. | 78 // Lazy allocate and leak this instance. |
80 static WorkerWebFrameClient* sharedInstance() | 79 static WorkerWebFrameClient* sharedInstance() |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 #else | 374 #else |
376 | 375 |
377 WebWorker* WebWorker::create(WebWorkerClient* client) | 376 WebWorker* WebWorker::create(WebWorkerClient* client) |
378 { | 377 { |
379 return 0; | 378 return 0; |
380 } | 379 } |
381 | 380 |
382 #endif // ENABLE(WORKERS) | 381 #endif // ENABLE(WORKERS) |
383 | 382 |
384 } // namespace WebKit | 383 } // namespace WebKit |
OLD | NEW |