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