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

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

Issue 2694413006: Scope and clean up uses of AccessibilityMode. (Closed)
Patch Set: address comments Created 3 years, 10 months 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 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 web_user_media_client_(NULL), 1089 web_user_media_client_(NULL),
1090 #if defined(OS_ANDROID) 1090 #if defined(OS_ANDROID)
1091 media_player_manager_(NULL), 1091 media_player_manager_(NULL),
1092 #endif 1092 #endif
1093 media_surface_manager_(nullptr), 1093 media_surface_manager_(nullptr),
1094 devtools_agent_(nullptr), 1094 devtools_agent_(nullptr),
1095 push_messaging_dispatcher_(NULL), 1095 push_messaging_dispatcher_(NULL),
1096 presentation_dispatcher_(NULL), 1096 presentation_dispatcher_(NULL),
1097 screen_orientation_dispatcher_(NULL), 1097 screen_orientation_dispatcher_(NULL),
1098 manifest_manager_(NULL), 1098 manifest_manager_(NULL),
1099 accessibility_mode_(AccessibilityModeOff), 1099 accessibility_mode_(AccessibilityMode::kOff),
1100 render_accessibility_(NULL), 1100 render_accessibility_(NULL),
1101 media_player_delegate_(NULL), 1101 media_player_delegate_(NULL),
1102 previews_state_(PREVIEWS_UNSPECIFIED), 1102 previews_state_(PREVIEWS_UNSPECIFIED),
1103 effective_connection_type_( 1103 effective_connection_type_(
1104 blink::WebEffectiveConnectionType::TypeUnknown), 1104 blink::WebEffectiveConnectionType::TypeUnknown),
1105 is_pasting_(false), 1105 is_pasting_(false),
1106 suppress_further_dialogs_(false), 1106 suppress_further_dialogs_(false),
1107 blame_context_(nullptr), 1107 blame_context_(nullptr),
1108 #if BUILDFLAG(ENABLE_PLUGINS) 1108 #if BUILDFLAG(ENABLE_PLUGINS)
1109 focused_pepper_plugin_(nullptr), 1109 focused_pepper_plugin_(nullptr),
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 if (render_accessibility_) { 2111 if (render_accessibility_) {
2112 // Note: this isn't called automatically by the destructor because 2112 // Note: this isn't called automatically by the destructor because
2113 // there'd be no point in calling it in frame teardown, only if there's 2113 // there'd be no point in calling it in frame teardown, only if there's
2114 // an accessibility mode change but the frame is persisting. 2114 // an accessibility mode change but the frame is persisting.
2115 render_accessibility_->DisableAccessibility(); 2115 render_accessibility_->DisableAccessibility();
2116 2116
2117 delete render_accessibility_; 2117 delete render_accessibility_;
2118 render_accessibility_ = NULL; 2118 render_accessibility_ = NULL;
2119 } 2119 }
2120 2120
2121 if (accessibility_mode_ & ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS) { 2121 if (accessibility_mode_.hasMode(AccessibilityMode::kWebContents)) {
2122 render_accessibility_ = new RenderAccessibilityImpl( 2122 render_accessibility_ = new RenderAccessibilityImpl(
2123 this, accessibility_mode_); 2123 this, accessibility_mode_);
2124 } 2124 }
2125 2125
2126 for (auto& observer : observers_) 2126 for (auto& observer : observers_)
2127 observer.AccessibilityModeChanged(); 2127 observer.AccessibilityModeChanged();
2128 } 2128 }
2129 2129
2130 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) { 2130 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) {
2131 AXContentTreeUpdate response; 2131 AXContentTreeUpdate response;
(...skipping 4731 matching lines...) Expand 10 before | Expand all | Expand 10 after
6863 // event target. Potentially a Pepper plugin will receive the event. 6863 // event target. Potentially a Pepper plugin will receive the event.
6864 // In order to tell whether a plugin gets the last mouse event and which it 6864 // In order to tell whether a plugin gets the last mouse event and which it
6865 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6865 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6866 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6866 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6867 // |pepper_last_mouse_event_target_|. 6867 // |pepper_last_mouse_event_target_|.
6868 pepper_last_mouse_event_target_ = nullptr; 6868 pepper_last_mouse_event_target_ = nullptr;
6869 #endif 6869 #endif
6870 } 6870 }
6871 6871
6872 } // namespace content 6872 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698