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