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