| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 } // namespace | 164 } // namespace |
| 165 | 165 |
| 166 class CompositorAnimationTimeline; | 166 class CompositorAnimationTimeline; |
| 167 | 167 |
| 168 // Converts a AXObjectCache::AXNotification to a WebAXEvent | 168 // Converts a AXObjectCache::AXNotification to a WebAXEvent |
| 169 static WebAXEvent ToWebAXEvent(AXObjectCache::AXNotification notification) { | 169 static WebAXEvent ToWebAXEvent(AXObjectCache::AXNotification notification) { |
| 170 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | 170 // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
| 171 return static_cast<WebAXEvent>(notification); | 171 return static_cast<WebAXEvent>(notification); |
| 172 } | 172 } |
| 173 | 173 |
| 174 ChromeClientImpl::ChromeClientImpl(WebViewImpl* web_view) | 174 ChromeClientImpl::ChromeClientImpl(WebViewBase* web_view) |
| 175 : web_view_(web_view), | 175 : web_view_(web_view), |
| 176 cursor_overridden_(false), | 176 cursor_overridden_(false), |
| 177 did_request_non_empty_tool_tip_(false) {} | 177 did_request_non_empty_tool_tip_(false) {} |
| 178 | 178 |
| 179 ChromeClientImpl::~ChromeClientImpl() {} | 179 ChromeClientImpl::~ChromeClientImpl() {} |
| 180 | 180 |
| 181 ChromeClientImpl* ChromeClientImpl::Create(WebViewImpl* web_view) { | 181 ChromeClientImpl* ChromeClientImpl::Create(WebViewBase* web_view) { |
| 182 return new ChromeClientImpl(web_view); | 182 return new ChromeClientImpl(web_view); |
| 183 } | 183 } |
| 184 | 184 |
| 185 void* ChromeClientImpl::WebView() const { | 185 void* ChromeClientImpl::WebView() const { |
| 186 return static_cast<void*>(web_view_); | 186 return static_cast<void*>(web_view_); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void ChromeClientImpl::ChromeDestroyed() { | 189 void ChromeClientImpl::ChromeDestroyed() { |
| 190 // Our lifetime is bound to the WebViewImpl. | 190 // Our lifetime is bound to the WebViewBase. |
| 191 } | 191 } |
| 192 | 192 |
| 193 void ChromeClientImpl::SetWindowRect(const IntRect& r, LocalFrame& frame) { | 193 void ChromeClientImpl::SetWindowRect(const IntRect& r, LocalFrame& frame) { |
| 194 DCHECK_EQ(&frame, web_view_->MainFrameImpl()->GetFrame()); | 194 DCHECK_EQ(&frame, web_view_->MainFrameImpl()->GetFrame()); |
| 195 WebWidgetClient* client = | 195 WebWidgetClient* client = |
| 196 WebLocalFrameImpl::FromFrame(&frame)->FrameWidget()->Client(); | 196 WebLocalFrameImpl::FromFrame(&frame)->FrameWidget()->Client(); |
| 197 client->SetWindowRect(r); | 197 client->SetWindowRect(r); |
| 198 } | 198 } |
| 199 | 199 |
| 200 IntRect ChromeClientImpl::RootWindowRect() { | 200 IntRect ChromeClientImpl::RootWindowRect() { |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 layer_tree_view->RegisterSelection(WebSelection(selection)); | 903 layer_tree_view->RegisterSelection(WebSelection(selection)); |
| 904 } | 904 } |
| 905 | 905 |
| 906 bool ChromeClientImpl::HasOpenedPopup() const { | 906 bool ChromeClientImpl::HasOpenedPopup() const { |
| 907 return web_view_->HasOpenedPopup(); | 907 return web_view_->HasOpenedPopup(); |
| 908 } | 908 } |
| 909 | 909 |
| 910 PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, | 910 PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, |
| 911 HTMLSelectElement& select) { | 911 HTMLSelectElement& select) { |
| 912 NotifyPopupOpeningObservers(); | 912 NotifyPopupOpeningObservers(); |
| 913 if (WebViewImpl::UseExternalPopupMenus()) | 913 if (WebViewBase::UseExternalPopupMenus()) |
| 914 return new ExternalPopupMenu(frame, select, *web_view_); | 914 return new ExternalPopupMenu(frame, select, *web_view_); |
| 915 | 915 |
| 916 DCHECK(RuntimeEnabledFeatures::pagePopupEnabled()); | 916 DCHECK(RuntimeEnabledFeatures::pagePopupEnabled()); |
| 917 return PopupMenuImpl::Create(this, select); | 917 return PopupMenuImpl::Create(this, select); |
| 918 } | 918 } |
| 919 | 919 |
| 920 PagePopup* ChromeClientImpl::OpenPagePopup(PagePopupClient* client) { | 920 PagePopup* ChromeClientImpl::OpenPagePopup(PagePopupClient* client) { |
| 921 return web_view_->OpenPagePopup(client); | 921 return web_view_->OpenPagePopup(client); |
| 922 } | 922 } |
| 923 | 923 |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1239 if (RuntimeEnabledFeatures::presentationEnabled()) | 1239 if (RuntimeEnabledFeatures::presentationEnabled()) |
| 1240 PresentationController::ProvideTo(frame, client->PresentationClient()); | 1240 PresentationController::ProvideTo(frame, client->PresentationClient()); |
| 1241 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { | 1241 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { |
| 1242 ProvideAudioOutputDeviceClientTo(frame, | 1242 ProvideAudioOutputDeviceClientTo(frame, |
| 1243 new AudioOutputDeviceClientImpl(frame)); | 1243 new AudioOutputDeviceClientImpl(frame)); |
| 1244 } | 1244 } |
| 1245 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); | 1245 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); |
| 1246 } | 1246 } |
| 1247 | 1247 |
| 1248 } // namespace blink | 1248 } // namespace blink |
| OLD | NEW |