| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "core/exported/WebFileChooserCompletionImpl.h" | 43 #include "core/exported/WebFileChooserCompletionImpl.h" |
| 44 #include "core/exported/WebPluginContainerBase.h" | 44 #include "core/exported/WebPluginContainerBase.h" |
| 45 #include "core/exported/WebViewBase.h" | 45 #include "core/exported/WebViewBase.h" |
| 46 #include "core/frame/FrameView.h" | 46 #include "core/frame/FrameView.h" |
| 47 #include "core/frame/Settings.h" | 47 #include "core/frame/Settings.h" |
| 48 #include "core/frame/VisualViewport.h" | 48 #include "core/frame/VisualViewport.h" |
| 49 #include "core/html/HTMLInputElement.h" | 49 #include "core/html/HTMLInputElement.h" |
| 50 #include "core/html/forms/ColorChooser.h" | 50 #include "core/html/forms/ColorChooser.h" |
| 51 #include "core/html/forms/ColorChooserClient.h" | 51 #include "core/html/forms/ColorChooserClient.h" |
| 52 #include "core/html/forms/DateTimeChooser.h" | 52 #include "core/html/forms/DateTimeChooser.h" |
| 53 #include "core/html/forms/DateTimeChooserClient.h" |
| 53 #include "core/layout/HitTestResult.h" | 54 #include "core/layout/HitTestResult.h" |
| 54 #include "core/layout/LayoutPart.h" | 55 #include "core/layout/LayoutPart.h" |
| 55 #include "core/layout/compositing/CompositedSelection.h" | 56 #include "core/layout/compositing/CompositedSelection.h" |
| 56 #include "core/loader/DocumentLoader.h" | 57 #include "core/loader/DocumentLoader.h" |
| 57 #include "core/loader/FrameLoadRequest.h" | 58 #include "core/loader/FrameLoadRequest.h" |
| 58 #include "core/page/ChromeClient.h" | 59 #include "core/page/ChromeClient.h" |
| 59 #include "core/page/Page.h" | 60 #include "core/page/Page.h" |
| 60 #include "core/page/PopupOpeningObserver.h" | 61 #include "core/page/PopupOpeningObserver.h" |
| 61 #include "modules/accessibility/AXObjectImpl.h" | 62 #include "modules/accessibility/AXObjectImpl.h" |
| 62 #include "modules/audio_output_devices/AudioOutputDeviceClient.h" | 63 #include "modules/audio_output_devices/AudioOutputDeviceClient.h" |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 if (web_view_->Client()) | 699 if (web_view_->Client()) |
| 699 web_view_->Client()->PrintPage(WebLocalFrameImpl::FromFrame(frame)); | 700 web_view_->Client()->PrintPage(WebLocalFrameImpl::FromFrame(frame)); |
| 700 } | 701 } |
| 701 | 702 |
| 702 ColorChooser* ChromeClientImpl::OpenColorChooser( | 703 ColorChooser* ChromeClientImpl::OpenColorChooser( |
| 703 LocalFrame* frame, | 704 LocalFrame* frame, |
| 704 ColorChooserClient* chooser_client, | 705 ColorChooserClient* chooser_client, |
| 705 const Color&) { | 706 const Color&) { |
| 706 NotifyPopupOpeningObservers(); | 707 NotifyPopupOpeningObservers(); |
| 707 ColorChooserUIController* controller = nullptr; | 708 ColorChooserUIController* controller = nullptr; |
| 709 |
| 710 if (frame->GetDocument()->GetSettings()->GetPagePopupsSuppressed()) |
| 711 return nullptr; |
| 712 |
| 708 if (RuntimeEnabledFeatures::pagePopupEnabled()) | 713 if (RuntimeEnabledFeatures::pagePopupEnabled()) |
| 709 controller = | 714 controller = |
| 710 ColorChooserPopupUIController::Create(frame, this, chooser_client); | 715 ColorChooserPopupUIController::Create(frame, this, chooser_client); |
| 711 else | 716 else |
| 712 controller = ColorChooserUIController::Create(frame, chooser_client); | 717 controller = ColorChooserUIController::Create(frame, chooser_client); |
| 713 controller->OpenUI(); | 718 controller->OpenUI(); |
| 714 return controller; | 719 return controller; |
| 715 } | 720 } |
| 716 | 721 |
| 717 DateTimeChooser* ChromeClientImpl::OpenDateTimeChooser( | 722 DateTimeChooser* ChromeClientImpl::OpenDateTimeChooser( |
| 718 DateTimeChooserClient* picker_client, | 723 DateTimeChooserClient* picker_client, |
| 719 const DateTimeChooserParameters& parameters) { | 724 const DateTimeChooserParameters& parameters) { |
| 725 if (picker_client->OwnerElement() |
| 726 .GetDocument() |
| 727 .GetSettings() |
| 728 ->GetPagePopupsSuppressed()) |
| 729 return nullptr; |
| 730 |
| 720 NotifyPopupOpeningObservers(); | 731 NotifyPopupOpeningObservers(); |
| 721 if (RuntimeEnabledFeatures::inputMultipleFieldsUIEnabled()) | 732 if (RuntimeEnabledFeatures::inputMultipleFieldsUIEnabled()) |
| 722 return DateTimeChooserImpl::Create(this, picker_client, parameters); | 733 return DateTimeChooserImpl::Create(this, picker_client, parameters); |
| 723 return ExternalDateTimeChooser::Create(this, web_view_->Client(), | 734 return ExternalDateTimeChooser::Create(this, web_view_->Client(), |
| 724 picker_client, parameters); | 735 picker_client, parameters); |
| 725 } | 736 } |
| 726 | 737 |
| 727 void ChromeClientImpl::OpenFileChooser(LocalFrame* frame, | 738 void ChromeClientImpl::OpenFileChooser(LocalFrame* frame, |
| 728 PassRefPtr<FileChooser> file_chooser) { | 739 PassRefPtr<FileChooser> file_chooser) { |
| 729 NotifyPopupOpeningObservers(); | 740 NotifyPopupOpeningObservers(); |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 if (RuntimeEnabledFeatures::presentationEnabled()) | 1267 if (RuntimeEnabledFeatures::presentationEnabled()) |
| 1257 PresentationController::ProvideTo(frame, client->PresentationClient()); | 1268 PresentationController::ProvideTo(frame, client->PresentationClient()); |
| 1258 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { | 1269 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { |
| 1259 ProvideAudioOutputDeviceClientTo(frame, | 1270 ProvideAudioOutputDeviceClientTo(frame, |
| 1260 new AudioOutputDeviceClientImpl(frame)); | 1271 new AudioOutputDeviceClientImpl(frame)); |
| 1261 } | 1272 } |
| 1262 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); | 1273 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); |
| 1263 } | 1274 } |
| 1264 | 1275 |
| 1265 } // namespace blink | 1276 } // namespace blink |
| OLD | NEW |