| 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 "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 | 8 |
| 9 MSVC_PUSH_WARNING_LEVEL(0); | 9 MSVC_PUSH_WARNING_LEVEL(0); |
| 10 #include "Cursor.h" | 10 #include "Cursor.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 RefPtr<WebCore::FileChooser> file_chooser_; | 50 RefPtr<WebCore::FileChooser> file_chooser_; |
| 51 DISALLOW_EVIL_CONSTRUCTORS(WebFileChooserCallbackImpl); | 51 DISALLOW_EVIL_CONSTRUCTORS(WebFileChooserCallbackImpl); |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webview) | 54 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webview) |
| 55 : webview_(webview), | 55 : webview_(webview), |
| 56 toolbars_visible_(true), | 56 toolbars_visible_(true), |
| 57 statusbar_visible_(true), | 57 statusbar_visible_(true), |
| 58 scrollbars_visible_(true), | 58 scrollbars_visible_(true), |
| 59 menubar_visible_(true), | 59 menubar_visible_(true), |
| 60 resizable_(true) { | 60 resizable_(true), |
| 61 ignore_next_set_cursor_(false) { |
| 61 } | 62 } |
| 62 | 63 |
| 63 ChromeClientImpl::~ChromeClientImpl() { | 64 ChromeClientImpl::~ChromeClientImpl() { |
| 64 } | 65 } |
| 65 | 66 |
| 66 void ChromeClientImpl::chromeDestroyed() { | 67 void ChromeClientImpl::chromeDestroyed() { |
| 67 delete this; | 68 delete this; |
| 68 } | 69 } |
| 69 | 70 |
| 70 void ChromeClientImpl::setWindowRect(const WebCore::FloatRect& r) { | 71 void ChromeClientImpl::setWindowRect(const WebCore::FloatRect& r) { |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 WebViewDelegate* d = webview_->delegate(); | 466 WebViewDelegate* d = webview_->delegate(); |
| 466 if (d) { | 467 if (d) { |
| 467 WebWidgetImpl* webwidget = | 468 WebWidgetImpl* webwidget = |
| 468 static_cast<WebWidgetImpl*>(d->CreatePopupWidget(webview_, | 469 static_cast<WebWidgetImpl*>(d->CreatePopupWidget(webview_, |
| 469 focus_on_show)); | 470 focus_on_show)); |
| 470 webwidget->Init(popup_view, webkit_glue::FromIntRect(bounds)); | 471 webwidget->Init(popup_view, webkit_glue::FromIntRect(bounds)); |
| 471 } | 472 } |
| 472 } | 473 } |
| 473 | 474 |
| 474 void ChromeClientImpl::SetCursor(const WebCursor& cursor) { | 475 void ChromeClientImpl::SetCursor(const WebCursor& cursor) { |
| 476 if (ignore_next_set_cursor_) { |
| 477 ignore_next_set_cursor_ = false; |
| 478 return; |
| 479 } |
| 480 |
| 475 WebViewDelegate* d = webview_->delegate(); | 481 WebViewDelegate* d = webview_->delegate(); |
| 476 if (d) | 482 if (d) |
| 477 d->SetCursor(webview_, cursor); | 483 d->SetCursor(webview_, cursor); |
| 478 } | 484 } |
| 479 | 485 |
| 486 void ChromeClientImpl::SetCursorForPlugin(const WebCursor& cursor) { |
| 487 SetCursor(cursor); |
| 488 // Currently, Widget::setCursor is always called after this function in |
| 489 // EventHandler.cpp and since we don't want that we set a flag indicating |
| 490 // that the next SetCursor call is to be ignored. |
| 491 ignore_next_set_cursor_ = true; |
| 492 } |
| 493 |
| 480 void ChromeClientImpl::enableSuddenTermination() { | 494 void ChromeClientImpl::enableSuddenTermination() { |
| 481 WebViewDelegate* d = webview_->delegate(); | 495 WebViewDelegate* d = webview_->delegate(); |
| 482 if (d) | 496 if (d) |
| 483 d->EnableSuddenTermination(); | 497 d->EnableSuddenTermination(); |
| 484 } | 498 } |
| 485 | 499 |
| 486 void ChromeClientImpl::disableSuddenTermination() { | 500 void ChromeClientImpl::disableSuddenTermination() { |
| 487 WebViewDelegate* d = webview_->delegate(); | 501 WebViewDelegate* d = webview_->delegate(); |
| 488 if (d) | 502 if (d) |
| 489 d->DisableSuddenTermination(); | 503 d->DisableSuddenTermination(); |
| 490 } | 504 } |
| 491 | 505 |
| 492 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { | 506 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { |
| 493 WebViewDelegate* d = webview_->delegate(); | 507 WebViewDelegate* d = webview_->delegate(); |
| 494 if (d) | 508 if (d) |
| 495 d->OnNavStateChanged(webview_); | 509 d->OnNavStateChanged(webview_); |
| 496 } | 510 } |
| OLD | NEW |