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

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

Issue 2581483002: Add support for faster, more limited accessibility modes. (Closed)
Patch Set: Android compile fix 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 LOG(ERROR) << "Mode: " << accessibility_mode_;
2122 render_accessibility_ = new RenderAccessibilityImpl(
2123 this, accessibility_mode_);
2124 }
2122 2125
2123 for (auto& observer : observers_) 2126 for (auto& observer : observers_)
2124 observer.AccessibilityModeChanged(); 2127 observer.AccessibilityModeChanged();
2125 } 2128 }
2126 2129
2127 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) { 2130 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) {
2128 AXContentTreeUpdate response; 2131 AXContentTreeUpdate response;
2129 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response); 2132 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response);
2130 Send(new AccessibilityHostMsg_SnapshotResponse( 2133 Send(new AccessibilityHostMsg_SnapshotResponse(
2131 routing_id_, callback_id, response)); 2134 routing_id_, callback_id, response));
(...skipping 4553 matching lines...) Expand 10 before | Expand all | Expand 10 after
6685 // event target. Potentially a Pepper plugin will receive the event. 6688 // event target. Potentially a Pepper plugin will receive the event.
6686 // In order to tell whether a plugin gets the last mouse event and which it 6689 // In order to tell whether a plugin gets the last mouse event and which it
6687 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6690 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6688 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6691 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6689 // |pepper_last_mouse_event_target_|. 6692 // |pepper_last_mouse_event_target_|.
6690 pepper_last_mouse_event_target_ = nullptr; 6693 pepper_last_mouse_event_target_ = nullptr;
6691 #endif 6694 #endif
6692 } 6695 }
6693 6696
6694 } // namespace content 6697 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698