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 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2095 accessibility_mode_ = new_mode; | 2095 accessibility_mode_ = new_mode; |
2096 if (render_accessibility_) { | 2096 if (render_accessibility_) { |
2097 // Note: this isn't called automatically by the destructor because | 2097 // Note: this isn't called automatically by the destructor because |
2098 // there'd be no point in calling it in frame teardown, only if there's | 2098 // there'd be no point in calling it in frame teardown, only if there's |
2099 // an accessibility mode change but the frame is persisting. | 2099 // an accessibility mode change but the frame is persisting. |
2100 render_accessibility_->DisableAccessibility(); | 2100 render_accessibility_->DisableAccessibility(); |
2101 | 2101 |
2102 delete render_accessibility_; | 2102 delete render_accessibility_; |
2103 render_accessibility_ = NULL; | 2103 render_accessibility_ = NULL; |
2104 } | 2104 } |
2105 if (accessibility_mode_ == AccessibilityModeOff) | |
2106 return; | |
2107 | 2105 |
2108 if (accessibility_mode_ & AccessibilityModeFlagFullTree) | 2106 if (accessibility_mode_ & AccessibilityModeFlagFullTree) |
2109 render_accessibility_ = new RenderAccessibilityImpl(this); | 2107 render_accessibility_ = new RenderAccessibilityImpl(this); |
| 2108 |
| 2109 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, |
| 2110 AccessibilityModeChanged()); |
2110 } | 2111 } |
2111 | 2112 |
2112 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) { | 2113 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) { |
2113 AXContentTreeUpdate response; | 2114 AXContentTreeUpdate response; |
2114 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response); | 2115 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response); |
2115 Send(new AccessibilityHostMsg_SnapshotResponse( | 2116 Send(new AccessibilityHostMsg_SnapshotResponse( |
2116 routing_id_, callback_id, response)); | 2117 routing_id_, callback_id, response)); |
2117 } | 2118 } |
2118 | 2119 |
2119 void RenderFrameImpl::OnUpdateOpener(int opener_routing_id) { | 2120 void RenderFrameImpl::OnUpdateOpener(int opener_routing_id) { |
(...skipping 4209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6329 // event target. Potentially a Pepper plugin will receive the event. | 6330 // event target. Potentially a Pepper plugin will receive the event. |
6330 // In order to tell whether a plugin gets the last mouse event and which it | 6331 // In order to tell whether a plugin gets the last mouse event and which it |
6331 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6332 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6332 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6333 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6333 // |pepper_last_mouse_event_target_|. | 6334 // |pepper_last_mouse_event_target_|. |
6334 pepper_last_mouse_event_target_ = nullptr; | 6335 pepper_last_mouse_event_target_ = nullptr; |
6335 #endif | 6336 #endif |
6336 } | 6337 } |
6337 | 6338 |
6338 } // namespace content | 6339 } // namespace content |
OLD | NEW |