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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 AXObject* 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(ToAXObjectImpl(obj)), |
| 231 static_cast<WebAXEvent>(notification)); |
| 232 } |
231 } | 233 } |
232 | 234 |
233 void SetToolTip(LocalFrame&, | 235 void SetToolTip(LocalFrame&, |
234 const String& tooltip_text, | 236 const String& tooltip_text, |
235 TextDirection dir) override { | 237 TextDirection dir) override { |
236 if (popup_->WidgetClient()) | 238 if (popup_->WidgetClient()) |
237 popup_->WidgetClient()->SetToolTipText(tooltip_text, | 239 popup_->WidgetClient()->SetToolTipText(tooltip_text, |
238 ToWebTextDirection(dir)); | 240 ToWebTextDirection(dir)); |
239 } | 241 } |
240 | 242 |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 // A WebPagePopupImpl instance usually has two references. | 605 // A WebPagePopupImpl instance usually has two references. |
604 // - One owned by the instance itself. It represents the visible widget. | 606 // - 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 | 607 // - One owned by a WebViewBase. It's released when the WebViewBase ask the |
606 // WebPagePopupImpl to close. | 608 // WebPagePopupImpl to close. |
607 // We need them because the closing operation is asynchronous and the widget | 609 // We need them because the closing operation is asynchronous and the widget |
608 // can be closed while the WebViewBase is unaware of it. | 610 // can be closed while the WebViewBase is unaware of it. |
609 return AdoptRef(new WebPagePopupImpl(client)).LeakRef(); | 611 return AdoptRef(new WebPagePopupImpl(client)).LeakRef(); |
610 } | 612 } |
611 | 613 |
612 } // namespace blink | 614 } // namespace blink |
OLD | NEW |