OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2104 accessibility_mode_ = new_mode; | 2104 accessibility_mode_ = new_mode; |
2105 if (render_accessibility_) { | 2105 if (render_accessibility_) { |
2106 // Note: this isn't called automatically by the destructor because | 2106 // Note: this isn't called automatically by the destructor because |
2107 // there'd be no point in calling it in frame teardown, only if there's | 2107 // there'd be no point in calling it in frame teardown, only if there's |
2108 // an accessibility mode change but the frame is persisting. | 2108 // an accessibility mode change but the frame is persisting. |
2109 render_accessibility_->DisableAccessibility(); | 2109 render_accessibility_->DisableAccessibility(); |
2110 | 2110 |
2111 delete render_accessibility_; | 2111 delete render_accessibility_; |
2112 render_accessibility_ = NULL; | 2112 render_accessibility_ = NULL; |
2113 } | 2113 } |
2114 if (accessibility_mode_ == AccessibilityModeOff) | |
2115 return; | |
2116 | 2114 |
2117 if (accessibility_mode_ & AccessibilityModeFlagFullTree) | 2115 if (accessibility_mode_ & AccessibilityModeFlagFullTree) |
2118 render_accessibility_ = new RenderAccessibilityImpl(this); | 2116 render_accessibility_ = new RenderAccessibilityImpl(this); |
2117 | |
2118 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, | |
2119 AccessibilityModeChanged()); | |
raymes
2016/06/28 00:02:12
Should we pass a bool indicating whether it is ena
dmazzoni
2016/06/28 17:14:06
Doesn't seem to be needed because it can just acce
raymes
2016/06/29 00:31:36
Ahh ok - so that will only be a valid pointer if a
| |
2119 } | 2120 } |
2120 | 2121 |
2121 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) { | 2122 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) { |
2122 AXContentTreeUpdate response; | 2123 AXContentTreeUpdate response; |
2123 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response); | 2124 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response); |
2124 Send(new AccessibilityHostMsg_SnapshotResponse( | 2125 Send(new AccessibilityHostMsg_SnapshotResponse( |
2125 routing_id_, callback_id, response)); | 2126 routing_id_, callback_id, response)); |
2126 } | 2127 } |
2127 | 2128 |
2128 void RenderFrameImpl::OnUpdateOpener(int opener_routing_id) { | 2129 void RenderFrameImpl::OnUpdateOpener(int opener_routing_id) { |
(...skipping 4181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6310 // event target. Potentially a Pepper plugin will receive the event. | 6311 // event target. Potentially a Pepper plugin will receive the event. |
6311 // In order to tell whether a plugin gets the last mouse event and which it | 6312 // In order to tell whether a plugin gets the last mouse event and which it |
6312 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6313 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6313 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6314 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6314 // |pepper_last_mouse_event_target_|. | 6315 // |pepper_last_mouse_event_target_|. |
6315 pepper_last_mouse_event_target_ = nullptr; | 6316 pepper_last_mouse_event_target_ = nullptr; |
6316 #endif | 6317 #endif |
6317 } | 6318 } |
6318 | 6319 |
6319 } // namespace content | 6320 } // namespace content |
OLD | NEW |