Commit 6cff052f authored by Hiroki Sato's avatar Hiroki Sato Committed by Commit Bot

Fix methods visibility in arc accessibility classes

Some member functions are unnecessarily declared as protected, and they
should be private.

Also this CL fixes a lambda function from by-copy capture to by-reference
capture.

Bug: None
Test: unit_tests --gtest_filter="AXTreeSourceArcTest.*:ArcAccessibilityHelperBridgeTest.*"
Change-Id: I183174a922b6d57ea3b41a04053785b936b655b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1850687
Commit-Queue: Hiroki Sato <hirokisato@chromium.org>
Reviewed-by: default avatarSara Kato <sarakato@chromium.org>
Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704899}
parent 4230ff41
......@@ -109,11 +109,11 @@ class ArcAccessibilityHelperBridge
void set_filter_type_all_for_test() { use_filter_type_all_for_test_ = true; }
protected:
private:
// virtual for testing.
virtual aura::Window* GetActiveWindow();
virtual extensions::EventRouter* GetEventRouter() const;
private:
std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
void UpdateCaptionSettings() const;
......
......@@ -73,13 +73,12 @@ class ArcAccessibilityHelperBridgeTest : public ChromeViewsTestBase {
return event_router_->GetEventCount(event_name);
}
protected:
private:
aura::Window* GetActiveWindow() override { return window_.get(); }
extensions::EventRouter* GetEventRouter() const override {
return event_router_;
}
private:
std::unique_ptr<aura::Window> window_;
extensions::TestEventRouter* const event_router_;
......
......@@ -262,7 +262,7 @@ void AXTreeSourceArc::GetChildren(
// descendants.
std::sort(
out_children->begin(), out_children->end(),
[this, id_to_index](auto left, auto right) {
[this, &id_to_index](auto left, auto right) {
auto left_bounds = ComputeEnclosingBounds(left);
auto right_bounds = ComputeEnclosingBounds(right);
......
......@@ -89,11 +89,11 @@ class AXTreeSourceArc : public ui::AXTreeSource<ArcAccessibilityInfoData*,
bool is_input_method_window() { return is_input_method_window_; }
protected:
private:
// virtual for testing.
virtual extensions::AutomationEventRouterInterface* GetAutomationEventRouter()
const;
private:
friend class arc::AXTreeSourceArcTest;
class FocusStealer;
......
......@@ -137,12 +137,12 @@ class AXTreeSourceArcTest : public testing::Test,
MockAutomationEventRouter* router)
: AXTreeSourceArc(delegate), router_(router) {}
private:
extensions::AutomationEventRouterInterface* GetAutomationEventRouter()
const override {
return router_;
}
private:
MockAutomationEventRouter* const router_;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment