| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "AccessibilityObject.h" | 7 #include "AccessibilityObject.h" |
| 8 #include "AXObjectCache.h" | 8 #include "AXObjectCache.h" |
| 9 #include "CharacterNames.h" | 9 #include "CharacterNames.h" |
| 10 #include "Console.h" | 10 #include "Console.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 webkit_glue::StringToWebString(message)); | 341 webkit_glue::StringToWebString(message)); |
| 342 } | 342 } |
| 343 return false; | 343 return false; |
| 344 } | 344 } |
| 345 | 345 |
| 346 void ChromeClientImpl::closeWindowSoon() { | 346 void ChromeClientImpl::closeWindowSoon() { |
| 347 // Make sure this Page can no longer be found by JS. | 347 // Make sure this Page can no longer be found by JS. |
| 348 webview_->page()->setGroupName(WebCore::String()); | 348 webview_->page()->setGroupName(WebCore::String()); |
| 349 | 349 |
| 350 // Make sure that all loading is stopped. Ensures that JS stops executing! | 350 // Make sure that all loading is stopped. Ensures that JS stops executing! |
| 351 webview_->StopLoading(); | 351 webview_->mainFrame()->stopLoading(); |
| 352 | 352 |
| 353 if (webview_->client()) | 353 if (webview_->client()) |
| 354 webview_->client()->closeWidgetSoon(); | 354 webview_->client()->closeWidgetSoon(); |
| 355 } | 355 } |
| 356 | 356 |
| 357 // Although a WebCore::Frame is passed in, we don't actually use it, since we | 357 // Although a WebCore::Frame is passed in, we don't actually use it, since we |
| 358 // already know our own webview_. | 358 // already know our own webview_. |
| 359 void ChromeClientImpl::runJavaScriptAlert(WebCore::Frame* frame, | 359 void ChromeClientImpl::runJavaScriptAlert(WebCore::Frame* frame, |
| 360 const WebCore::String& message) { | 360 const WebCore::String& message) { |
| 361 if (webview_->client()) { | 361 if (webview_->client()) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 webkit_glue::StringToWebString(message)); | 406 webkit_glue::StringToWebString(message)); |
| 407 } | 407 } |
| 408 } | 408 } |
| 409 | 409 |
| 410 bool ChromeClientImpl::shouldInterruptJavaScript() { | 410 bool ChromeClientImpl::shouldInterruptJavaScript() { |
| 411 // TODO(mbelshe): implement me | 411 // TODO(mbelshe): implement me |
| 412 return false; | 412 return false; |
| 413 } | 413 } |
| 414 | 414 |
| 415 bool ChromeClientImpl::tabsToLinks() const { | 415 bool ChromeClientImpl::tabsToLinks() const { |
| 416 return webview_->GetTabsToLinks(); | 416 return webview_->tabsToLinks(); |
| 417 } | 417 } |
| 418 | 418 |
| 419 WebCore::IntRect ChromeClientImpl::windowResizerRect() const { | 419 WebCore::IntRect ChromeClientImpl::windowResizerRect() const { |
| 420 WebCore::IntRect result; | 420 WebCore::IntRect result; |
| 421 if (webview_->delegate()) { | 421 if (webview_->delegate()) { |
| 422 result = webkit_glue::WebRectToIntRect( | 422 result = webkit_glue::WebRectToIntRect( |
| 423 webview_->delegate()->windowResizerRect()); | 423 webview_->delegate()->windowResizerRect()); |
| 424 } | 424 } |
| 425 return result; | 425 return result; |
| 426 } | 426 } |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 info->itemHeight = popup_container->menuItemHeight(); | 612 info->itemHeight = popup_container->menuItemHeight(); |
| 613 info->selectedIndex = popup_container->selectedIndex(); | 613 info->selectedIndex = popup_container->selectedIndex(); |
| 614 info->items.swap(output_items); | 614 info->items.swap(output_items); |
| 615 } | 615 } |
| 616 | 616 |
| 617 #if ENABLE(NOTIFICATIONS) | 617 #if ENABLE(NOTIFICATIONS) |
| 618 WebCore::NotificationPresenter* ChromeClientImpl::notificationPresenter() const
{ | 618 WebCore::NotificationPresenter* ChromeClientImpl::notificationPresenter() const
{ |
| 619 return webview_->GetNotificationPresenter(); | 619 return webview_->GetNotificationPresenter(); |
| 620 } | 620 } |
| 621 #endif | 621 #endif |
| OLD | NEW |