| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "core/frame/VisualViewport.h" | 40 #include "core/frame/VisualViewport.h" |
| 41 #include "core/input/EventHandler.h" | 41 #include "core/input/EventHandler.h" |
| 42 #include "core/layout/api/LayoutAPIShim.h" | 42 #include "core/layout/api/LayoutAPIShim.h" |
| 43 #include "core/layout/api/LayoutViewItem.h" | 43 #include "core/layout/api/LayoutViewItem.h" |
| 44 #include "core/loader/EmptyClients.h" | 44 #include "core/loader/EmptyClients.h" |
| 45 #include "core/loader/FrameLoadRequest.h" | 45 #include "core/loader/FrameLoadRequest.h" |
| 46 #include "core/page/FocusController.h" | 46 #include "core/page/FocusController.h" |
| 47 #include "core/page/Page.h" | 47 #include "core/page/Page.h" |
| 48 #include "core/page/PagePopupClient.h" | 48 #include "core/page/PagePopupClient.h" |
| 49 #include "core/page/PagePopupSupplement.h" | 49 #include "core/page/PagePopupSupplement.h" |
| 50 #include "modules/accessibility/AXObject.h" | |
| 51 #include "modules/accessibility/AXObjectCacheImpl.h" | 50 #include "modules/accessibility/AXObjectCacheImpl.h" |
| 51 #include "modules/accessibility/AXObjectImpl.h" |
| 52 #include "platform/EventDispatchForbiddenScope.h" | 52 #include "platform/EventDispatchForbiddenScope.h" |
| 53 #include "platform/LayoutTestSupport.h" | 53 #include "platform/LayoutTestSupport.h" |
| 54 #include "platform/ScriptForbiddenScope.h" | 54 #include "platform/ScriptForbiddenScope.h" |
| 55 #include "platform/animation/CompositorAnimationHost.h" | 55 #include "platform/animation/CompositorAnimationHost.h" |
| 56 #include "platform/graphics/GraphicsLayer.h" | 56 #include "platform/graphics/GraphicsLayer.h" |
| 57 #include "platform/heap/Handle.h" | 57 #include "platform/heap/Handle.h" |
| 58 #include "platform/instrumentation/tracing/TraceEvent.h" | 58 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 59 #include "platform/wtf/PtrUtil.h" | 59 #include "platform/wtf/PtrUtil.h" |
| 60 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" | 60 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" |
| 61 #include "public/platform/WebCursorInfo.h" | 61 #include "public/platform/WebCursorInfo.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 if (WebWidgetClient* client = widget->Client()) | 214 if (WebWidgetClient* client = widget->Client()) |
| 215 client->SetTouchAction(static_cast<WebTouchAction>(touch_action)); | 215 client->SetTouchAction(static_cast<WebTouchAction>(touch_action)); |
| 216 } | 216 } |
| 217 | 217 |
| 218 void AttachRootGraphicsLayer(GraphicsLayer* graphics_layer, | 218 void AttachRootGraphicsLayer(GraphicsLayer* graphics_layer, |
| 219 LocalFrame* local_root) override { | 219 LocalFrame* local_root) override { |
| 220 popup_->SetRootGraphicsLayer(graphics_layer); | 220 popup_->SetRootGraphicsLayer(graphics_layer); |
| 221 } | 221 } |
| 222 | 222 |
| 223 void PostAccessibilityNotification( | 223 void PostAccessibilityNotification( |
| 224 AXObject* obj, | 224 AXObjectImpl* obj, |
| 225 AXObjectCache::AXNotification notification) override { | 225 AXObjectCache::AXNotification notification) override { |
| 226 WebLocalFrameImpl* frame = WebLocalFrameImpl::FromFrame( | 226 WebLocalFrameImpl* frame = WebLocalFrameImpl::FromFrame( |
| 227 popup_->popup_client_->OwnerElement().GetDocument().GetFrame()); | 227 popup_->popup_client_->OwnerElement().GetDocument().GetFrame()); |
| 228 if (obj && frame && frame->Client()) | 228 if (obj && frame && frame->Client()) |
| 229 frame->Client()->PostAccessibilityEvent( | 229 frame->Client()->PostAccessibilityEvent( |
| 230 WebAXObject(obj), static_cast<WebAXEvent>(notification)); | 230 WebAXObject(obj), static_cast<WebAXEvent>(notification)); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void SetToolTip(LocalFrame&, | 233 void SetToolTip(LocalFrame&, |
| 234 const String& tooltip_text, | 234 const String& tooltip_text, |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 } | 348 } |
| 349 | 349 |
| 350 void WebPagePopupImpl::DestroyPage() { | 350 void WebPagePopupImpl::DestroyPage() { |
| 351 if (!page_) | 351 if (!page_) |
| 352 return; | 352 return; |
| 353 | 353 |
| 354 page_->WillBeDestroyed(); | 354 page_->WillBeDestroyed(); |
| 355 page_.Clear(); | 355 page_.Clear(); |
| 356 } | 356 } |
| 357 | 357 |
| 358 AXObject* WebPagePopupImpl::RootAXObject() { | 358 AXObjectImpl* WebPagePopupImpl::RootAXObject() { |
| 359 if (!page_ || !page_->MainFrame()) | 359 if (!page_ || !page_->MainFrame()) |
| 360 return 0; | 360 return 0; |
| 361 Document* document = ToLocalFrame(page_->MainFrame())->GetDocument(); | 361 Document* document = ToLocalFrame(page_->MainFrame())->GetDocument(); |
| 362 if (!document) | 362 if (!document) |
| 363 return 0; | 363 return 0; |
| 364 AXObjectCache* cache = document->AxObjectCache(); | 364 AXObjectCache* cache = document->AxObjectCache(); |
| 365 DCHECK(cache); | 365 DCHECK(cache); |
| 366 return ToAXObjectCacheImpl(cache)->GetOrCreate(ToLayoutView( | 366 return ToAXObjectCacheImpl(cache)->GetOrCreate(ToLayoutView( |
| 367 LayoutAPIShim::LayoutObjectFrom(document->GetLayoutViewItem()))); | 367 LayoutAPIShim::LayoutObjectFrom(document->GetLayoutViewItem()))); |
| 368 } | 368 } |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 // A WebPagePopupImpl instance usually has two references. | 603 // A WebPagePopupImpl instance usually has two references. |
| 604 // - One owned by the instance itself. It represents the visible widget. | 604 // - One owned by the instance itself. It represents the visible widget. |
| 605 // - One owned by a WebViewBase. It's released when the WebViewBase ask the | 605 // - One owned by a WebViewBase. It's released when the WebViewBase ask the |
| 606 // WebPagePopupImpl to close. | 606 // WebPagePopupImpl to close. |
| 607 // We need them because the closing operation is asynchronous and the widget | 607 // We need them because the closing operation is asynchronous and the widget |
| 608 // can be closed while the WebViewBase is unaware of it. | 608 // can be closed while the WebViewBase is unaware of it. |
| 609 return AdoptRef(new WebPagePopupImpl(client)).LeakRef(); | 609 return AdoptRef(new WebPagePopupImpl(client)).LeakRef(); |
| 610 } | 610 } |
| 611 | 611 |
| 612 } // namespace blink | 612 } // namespace blink |
| OLD | NEW |