OLD | NEW |
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2008 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 "config.h" | 5 #include "config.h" |
6 #include "ChromiumBridge.h" | 6 #include "ChromiumBridge.h" |
7 | 7 |
8 #include "BitmapImage.h" | 8 #include "BitmapImage.h" |
9 #include "Cursor.h" | 9 #include "Cursor.h" |
10 #include "Frame.h" | 10 #include "Frame.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 if (!page) | 90 if (!page) |
91 return NULL; | 91 return NULL; |
92 | 92 |
93 return static_cast<ChromeClientImpl*>(page->chrome()->client()); | 93 return static_cast<ChromeClientImpl*>(page->chrome()->client()); |
94 } | 94 } |
95 | 95 |
96 } // namespace | 96 } // namespace |
97 | 97 |
98 namespace WebCore { | 98 namespace WebCore { |
99 | 99 |
| 100 // Cookies -------------------------------------------------------------------- |
| 101 |
| 102 void ChromiumBridge::setCookies( |
| 103 const KURL& url, const KURL& policy_url, const String& cookie) { |
| 104 webkit_glue::SetCookie( |
| 105 webkit_glue::KURLToGURL(url), |
| 106 webkit_glue::KURLToGURL(policy_url), |
| 107 webkit_glue::StringToStdString(cookie)); |
| 108 } |
| 109 |
| 110 String ChromiumBridge::cookies(const KURL& url, const KURL& policy_url) { |
| 111 return webkit_glue::StdStringToString(webkit_glue::GetCookies( |
| 112 webkit_glue::KURLToGURL(url), |
| 113 webkit_glue::KURLToGURL(policy_url))); |
| 114 } |
| 115 |
100 // Font ----------------------------------------------------------------------- | 116 // Font ----------------------------------------------------------------------- |
101 | 117 |
102 #if defined(OS_WIN) | 118 #if defined(OS_WIN) |
103 bool ChromiumBridge::ensureFontLoaded(HFONT font) { | 119 bool ChromiumBridge::ensureFontLoaded(HFONT font) { |
104 return webkit_glue::EnsureFontLoaded(font); | 120 return webkit_glue::EnsureFontLoaded(font); |
105 } | 121 } |
106 #endif | 122 #endif |
107 | 123 |
108 // JavaScript ----------------------------------------------------------------- | 124 // JavaScript ----------------------------------------------------------------- |
109 | 125 |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 chrome_client->SetCursor(WebCursor(cursor.impl())); | 472 chrome_client->SetCursor(WebCursor(cursor.impl())); |
457 } | 473 } |
458 | 474 |
459 void ChromiumBridge::widgetSetFocus(Widget* widget) { | 475 void ChromiumBridge::widgetSetFocus(Widget* widget) { |
460 ChromeClientImpl* chrome_client = ToChromeClient(widget); | 476 ChromeClientImpl* chrome_client = ToChromeClient(widget); |
461 if (chrome_client) | 477 if (chrome_client) |
462 chrome_client->focus(); | 478 chrome_client->focus(); |
463 } | 479 } |
464 | 480 |
465 } // namespace WebCore | 481 } // namespace WebCore |
OLD | NEW |