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

Side by Side Diff: Source/WebKit/chromium/src/PlatformBridge.cpp

Issue 6955016: Merge 85823 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 7 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
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 #include "Worker.h" 98 #include "Worker.h"
99 #include "WorkerContextProxy.h" 99 #include "WorkerContextProxy.h"
100 #include <wtf/Assertions.h> 100 #include <wtf/Assertions.h>
101 101
102 // We are part of the WebKit implementation. 102 // We are part of the WebKit implementation.
103 using namespace WebKit; 103 using namespace WebKit;
104 104
105 namespace WebCore { 105 namespace WebCore {
106 106
107 static ChromeClientImpl* toChromeClientImpl(Widget* widget) 107 static WebWidgetClient* toWebWidgetClient(Widget* widget)
108 { 108 {
109 if (!widget) 109 if (!widget)
110 return 0; 110 return 0;
111 111
112 FrameView* view; 112 FrameView* view;
113 if (widget->isFrameView()) 113 if (widget->isFrameView())
114 view = static_cast<FrameView*>(widget); 114 view = static_cast<FrameView*>(widget);
115 else if (widget->parent() && widget->parent()->isFrameView()) 115 else if (widget->parent() && widget->parent()->isFrameView())
116 view = static_cast<FrameView*>(widget->parent()); 116 view = static_cast<FrameView*>(widget->parent());
117 else 117 else
118 return 0; 118 return 0;
119 119
120 Page* page = view->frame() ? view->frame()->page() : 0; 120 Page* page = view->frame() ? view->frame()->page() : 0;
121 if (!page) 121 if (!page)
122 return 0; 122 return 0;
123 123
124 return static_cast<ChromeClientImpl*>(page->chrome()->client()); 124 void* webView = page->chrome()->client()->webView();
125 } 125 if (!webView)
126 return 0;
126 127
127 static WebWidgetClient* toWebWidgetClient(Widget* widget) 128 return static_cast<WebViewImpl*>(webView)->client();
128 {
129 ChromeClientImpl* chromeClientImpl = toChromeClientImpl(widget);
130 if (!chromeClientImpl || !chromeClientImpl->webView())
131 return 0;
132 return chromeClientImpl->webView()->client();
133 } 129 }
134 130
135 static WebCookieJar* getCookieJar(const Document* document) 131 static WebCookieJar* getCookieJar(const Document* document)
136 { 132 {
137 WebFrameImpl* frameImpl = WebFrameImpl::fromFrame(document->frame()); 133 WebFrameImpl* frameImpl = WebFrameImpl::fromFrame(document->frame());
138 if (!frameImpl || !frameImpl->client()) 134 if (!frameImpl || !frameImpl->client())
139 return 0; 135 return 0;
140 WebCookieJar* cookieJar = frameImpl->client()->cookieJar(frameImpl); 136 WebCookieJar* cookieJar = frameImpl->client()->cookieJar(frameImpl);
141 if (!cookieJar) 137 if (!cookieJar)
142 cookieJar = webKitClient()->cookieJar(); 138 cookieJar = webKitClient()->cookieJar();
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 // FIXME: Give the embedder a way to control this. 1043 // FIXME: Give the embedder a way to control this.
1048 return false; 1044 return false;
1049 } 1045 }
1050 1046
1051 WorkerContextProxy* WorkerContextProxy::create(Worker* worker) 1047 WorkerContextProxy* WorkerContextProxy::create(Worker* worker)
1052 { 1048 {
1053 return WebWorkerClientImpl::createWorkerContextProxy(worker); 1049 return WebWorkerClientImpl::createWorkerContextProxy(worker);
1054 } 1050 }
1055 1051
1056 } // namespace WebCore 1052 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp ('k') | Source/WebKit/chromium/src/StorageNamespaceProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698