Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2581483002: Add support for faster, more limited accessibility modes. (Closed)
Patch Set: Disable tests that can't pass on Android with TODO Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 if (render_accessibility_) { 2110 if (render_accessibility_) {
2111 // Note: this isn't called automatically by the destructor because 2111 // Note: this isn't called automatically by the destructor because
2112 // there'd be no point in calling it in frame teardown, only if there's 2112 // there'd be no point in calling it in frame teardown, only if there's
2113 // an accessibility mode change but the frame is persisting. 2113 // an accessibility mode change but the frame is persisting.
2114 render_accessibility_->DisableAccessibility(); 2114 render_accessibility_->DisableAccessibility();
2115 2115
2116 delete render_accessibility_; 2116 delete render_accessibility_;
2117 render_accessibility_ = NULL; 2117 render_accessibility_ = NULL;
2118 } 2118 }
2119 2119
2120 if (accessibility_mode_ & ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS) 2120 if (accessibility_mode_ & ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS) {
2121 render_accessibility_ = new RenderAccessibilityImpl(this); 2121 render_accessibility_ = new RenderAccessibilityImpl(
2122 this, accessibility_mode_);
2123 }
2122 2124
2123 for (auto& observer : observers_) 2125 for (auto& observer : observers_)
2124 observer.AccessibilityModeChanged(); 2126 observer.AccessibilityModeChanged();
2125 } 2127 }
2126 2128
2127 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) { 2129 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) {
2128 AXContentTreeUpdate response; 2130 AXContentTreeUpdate response;
2129 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response); 2131 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response);
2130 Send(new AccessibilityHostMsg_SnapshotResponse( 2132 Send(new AccessibilityHostMsg_SnapshotResponse(
2131 routing_id_, callback_id, response)); 2133 routing_id_, callback_id, response));
(...skipping 4560 matching lines...) Expand 10 before | Expand all | Expand 10 after
6692 // event target. Potentially a Pepper plugin will receive the event. 6694 // event target. Potentially a Pepper plugin will receive the event.
6693 // In order to tell whether a plugin gets the last mouse event and which it 6695 // In order to tell whether a plugin gets the last mouse event and which it
6694 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6696 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6695 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6697 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6696 // |pepper_last_mouse_event_target_|. 6698 // |pepper_last_mouse_event_target_|.
6697 pepper_last_mouse_event_target_ = nullptr; 6699 pepper_last_mouse_event_target_ = nullptr;
6698 #endif 6700 #endif
6699 } 6701 }
6700 6702
6701 } // namespace content 6703 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/accessibility/render_accessibility_impl_browsertest.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698