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

Side by Side Diff: webkit/glue/webkitclient_impl.cc

Issue 338041: Move a bunch of files into webkit/api/src... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include <math.h> 5 #include <math.h>
6 #include "config.h" 6 #include "config.h"
7 7
8 #include "FrameView.h" 8 #include "FrameView.h"
9 #include "ScrollView.h" 9 #include "ScrollView.h"
10 #include <wtf/Assertions.h> 10 #include <wtf/Assertions.h>
(...skipping 11 matching lines...) Expand all
22 #include "grit/webkit_resources.h" 22 #include "grit/webkit_resources.h"
23 #include "grit/webkit_strings.h" 23 #include "grit/webkit_strings.h"
24 #include "net/base/net_util.h" 24 #include "net/base/net_util.h"
25 #include "webkit/api/public/WebCursorInfo.h" 25 #include "webkit/api/public/WebCursorInfo.h"
26 #include "webkit/api/public/WebData.h" 26 #include "webkit/api/public/WebData.h"
27 #include "webkit/api/public/WebFrameClient.h" 27 #include "webkit/api/public/WebFrameClient.h"
28 #include "webkit/api/public/WebPluginListBuilder.h" 28 #include "webkit/api/public/WebPluginListBuilder.h"
29 #include "webkit/api/public/WebScreenInfo.h" 29 #include "webkit/api/public/WebScreenInfo.h"
30 #include "webkit/api/public/WebString.h" 30 #include "webkit/api/public/WebString.h"
31 #include "webkit/api/public/WebViewClient.h" 31 #include "webkit/api/public/WebViewClient.h"
32 #include "webkit/glue/chrome_client_impl.h" 32 #include "webkit/api/src/ChromeClientImpl.h"
33 #include "webkit/glue/glue_util.h" 33 #include "webkit/glue/glue_util.h"
34 #include "webkit/glue/plugins/plugin_instance.h" 34 #include "webkit/glue/plugins/plugin_instance.h"
35 #include "webkit/glue/webkit_glue.h" 35 #include "webkit/glue/webkit_glue.h"
36 #include "webkit/glue/webplugininfo.h" 36 #include "webkit/glue/webplugininfo.h"
37 #include "webkit/glue/websocketstreamhandle_impl.h" 37 #include "webkit/glue/websocketstreamhandle_impl.h"
38 #include "webkit/glue/weburlloader_impl.h" 38 #include "webkit/glue/weburlloader_impl.h"
39 #include "webkit/glue/webview_impl.h" 39 #include "webkit/glue/webview_impl.h"
40 #include "webkit/glue/webworkerclient_impl.h" 40 #include "webkit/glue/webworkerclient_impl.h"
41 41
42 using WebKit::ChromeClientImpl;
42 using WebKit::WebApplicationCacheHost; 43 using WebKit::WebApplicationCacheHost;
43 using WebKit::WebApplicationCacheHostClient; 44 using WebKit::WebApplicationCacheHostClient;
44 using WebKit::WebCursorInfo; 45 using WebKit::WebCursorInfo;
45 using WebKit::WebData; 46 using WebKit::WebData;
46 using WebKit::WebLocalizedString; 47 using WebKit::WebLocalizedString;
47 using WebKit::WebPluginListBuilder; 48 using WebKit::WebPluginListBuilder;
48 using WebKit::WebStorageNamespace; 49 using WebKit::WebStorageNamespace;
49 using WebKit::WebString; 50 using WebKit::WebString;
50 using WebKit::WebSocketStreamHandle; 51 using WebKit::WebSocketStreamHandle;
51 using WebKit::WebThemeEngine; 52 using WebKit::WebThemeEngine;
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 WebCore::Page* page = frame->page(); 410 WebCore::Page* page = frame->page();
410 if (!page) 411 if (!page)
411 return; 412 return;
412 413
413 ChromeClientImpl* chrome_client = 414 ChromeClientImpl* chrome_client =
414 static_cast<ChromeClientImpl*>(page->chrome()->client()); 415 static_cast<ChromeClientImpl*>(page->chrome()->client());
415 416
416 // A windowless plugin can change the cursor in response to the WM_MOUSEMOVE 417 // A windowless plugin can change the cursor in response to the WM_MOUSEMOVE
417 // event. We need to reflect the changed cursor in the frame view as the 418 // event. We need to reflect the changed cursor in the frame view as the
418 // mouse is moved in the boundaries of the windowless plugin. 419 // mouse is moved in the boundaries of the windowless plugin.
419 chrome_client->SetCursorForPlugin(cursor_info); 420 chrome_client->setCursorForPlugin(cursor_info);
420 } 421 }
421 422
422 void WebKitClientImpl::notifyJSOutOfMemory(WebCore::Frame* frame) { 423 void WebKitClientImpl::notifyJSOutOfMemory(WebCore::Frame* frame) {
423 if (!frame) 424 if (!frame)
424 return; 425 return;
425 426
426 WebFrameImpl* webframe = WebFrameImpl::FromFrame(frame); 427 WebFrameImpl* webframe = WebFrameImpl::FromFrame(frame);
427 if (!webframe->client()) 428 if (!webframe->client())
428 return; 429 return;
429 webframe->client()->didExhaustMemoryAvailableForScript(webframe); 430 webframe->client()->didExhaustMemoryAvailableForScript(webframe);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 WebKit::WebWidgetClient* client = ToWebWidgetClient(widget); 478 WebKit::WebWidgetClient* client = ToWebWidgetClient(widget);
478 if (!client) 479 if (!client)
479 return WebCore::IntRect(); 480 return WebCore::IntRect();
480 return ToIntRect(client->screenInfo().availableRect); 481 return ToIntRect(client->screenInfo().availableRect);
481 } 482 }
482 483
483 void WebKitClientImpl::widgetSetCursor(WebCore::Widget* widget, 484 void WebKitClientImpl::widgetSetCursor(WebCore::Widget* widget,
484 const WebCore::Cursor& cursor) { 485 const WebCore::Cursor& cursor) {
485 ChromeClientImpl* chrome_client = ToChromeClient(widget); 486 ChromeClientImpl* chrome_client = ToChromeClient(widget);
486 if (chrome_client) 487 if (chrome_client)
487 chrome_client->SetCursor(CursorToWebCursorInfo(cursor)); 488 chrome_client->setCursor(CursorToWebCursorInfo(cursor));
488 } 489 }
489 490
490 void WebKitClientImpl::widgetSetFocus(WebCore::Widget* widget) { 491 void WebKitClientImpl::widgetSetFocus(WebCore::Widget* widget) {
491 ChromeClientImpl* chrome_client = ToChromeClient(widget); 492 ChromeClientImpl* chrome_client = ToChromeClient(widget);
492 if (chrome_client) 493 if (chrome_client)
493 chrome_client->focus(); 494 chrome_client->focus();
494 } 495 }
495 496
496 WebCore::WorkerContextProxy* WebKitClientImpl::createWorkerContextProxy( 497 WebCore::WorkerContextProxy* WebKitClientImpl::createWorkerContextProxy(
497 WebCore::Worker* worker) { 498 WebCore::Worker* worker) {
(...skipping 23 matching lines...) Expand all
521 return file_util::DirectoryExists(file_path); 522 return file_util::DirectoryExists(file_path);
522 } 523 }
523 524
524 WebKit::WebURL WebKitClientImpl::filePathToURL(const WebKit::WebString& path) { 525 WebKit::WebURL WebKitClientImpl::filePathToURL(const WebKit::WebString& path) {
525 FilePath file_path(webkit_glue::WebStringToFilePathString(path)); 526 FilePath file_path(webkit_glue::WebStringToFilePathString(path));
526 GURL file_url = net::FilePathToFileURL(file_path); 527 GURL file_url = net::FilePathToFileURL(file_path);
527 return webkit_glue::KURLToWebURL(webkit_glue::GURLToKURL(file_url)); 528 return webkit_glue::KURLToWebURL(webkit_glue::GURLToKURL(file_url));
528 } 529 }
529 530
530 } // namespace webkit_glue 531 } // namespace webkit_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698