Commit 5e093817 authored by Sammie Quon's avatar Sammie Quon Committed by Chromium LUCI CQ

capture_mode: Keyboard shortcuts to create/resize a region.

Add the following keyboard shortcuts to a capture session.

Space: Creates a default region 1/12th the size of the root.
Tab: Cycles through and highlights the region and affordance circles.
  Also handles events as these were affecting the top window.
Arrow keys: Shifts the region if it is focused, resizes the region if
  a affordance circle is focused.

Not in this CL:
  - moving focus to capture bar/capture button, requires those widgets
    to be focusable
  - leave focus on mouse click and start tabbing from the last mouse
    click

Bug: 1154778
Test: manual, added test
Change-Id: Ib4adf61e93bc7ad759fb33bac3185d069de0da65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575325
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836336}
parent 3ec3ab06
...@@ -27,6 +27,10 @@ constexpr SkColor kInkDropBaseColor = SK_ColorWHITE; ...@@ -27,6 +27,10 @@ constexpr SkColor kInkDropBaseColor = SK_ColorWHITE;
// CaptureModeBarView. // CaptureModeBarView.
constexpr int kBetweenChildSpacing = 16; constexpr int kBetweenChildSpacing = 16;
// The amount the capture region changes when using the arrow keys to adjust it.
constexpr int kArrowKeyboardRegionChangeDp = 1;
constexpr int kShiftArrowKeyboardRegionChangeDp = 10;
} // namespace capture_mode } // namespace capture_mode
} // namespace ash } // namespace ash
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "ash/capture_mode/capture_label_view.h" #include "ash/capture_mode/capture_label_view.h"
#include "ash/capture_mode/capture_mode_bar_view.h" #include "ash/capture_mode/capture_mode_bar_view.h"
#include "ash/capture_mode/capture_mode_constants.h"
#include "ash/capture_mode/capture_mode_controller.h" #include "ash/capture_mode/capture_mode_controller.h"
#include "ash/capture_mode/capture_mode_util.h" #include "ash/capture_mode/capture_mode_util.h"
#include "ash/capture_mode/capture_window_observer.h" #include "ash/capture_mode/capture_window_observer.h"
...@@ -100,6 +101,10 @@ constexpr gfx::ShadowValue kRegionAffordanceCircleShadow2( ...@@ -100,6 +101,10 @@ constexpr gfx::ShadowValue kRegionAffordanceCircleShadow2(
kRegionAffordanceCircleShadow2Blur, kRegionAffordanceCircleShadow2Blur,
SkColorSetARGB(38, 0, 0, 0)); SkColorSetARGB(38, 0, 0, 0));
// Values of the focus ring draw around the region or affordance circles.
constexpr int kFocusRingStrokeWidthDp = 2;
constexpr int kFocusRingSpacingDp = 2;
// When updating the capture region, request a repaint on the region and inset // When updating the capture region, request a repaint on the region and inset
// such that the border, affordance circles and affordance circle shadows are // such that the border, affordance circles and affordance circle shadows are
// all repainted as well. // all repainted as well.
...@@ -141,6 +146,11 @@ constexpr base::TimeDelta kCaptureBarOnReleaseOpacityChangeDuration = ...@@ -141,6 +146,11 @@ constexpr base::TimeDelta kCaptureBarOnReleaseOpacityChangeDuration =
// region easier to see. // region easier to see.
constexpr float kCaptureBarOverlapOpacity = 0.1; constexpr float kCaptureBarOverlapOpacity = 0.1;
// If the user is using keyboard only and they are on the selecting region
// phase, they can create default region which is centered and sized to this
// value times the root window's width and height.
constexpr float kRegionDefaultRatio = 0.12f;
// Mouse cursor warping is disabled when the capture source is a custom region. // Mouse cursor warping is disabled when the capture source is a custom region.
// Sets the mouse warp status to |enable| and return the original value. // Sets the mouse warp status to |enable| and return the original value.
bool SetMouseWarpEnabled(bool enable) { bool SetMouseWarpEnabled(bool enable) {
...@@ -250,6 +260,21 @@ ui::mojom::CursorType GetCursorTypeForFineTunePosition( ...@@ -250,6 +260,21 @@ ui::mojom::CursorType GetCursorTypeForFineTunePosition(
} }
} }
int GetArrowKeyPressChange(bool is_shift_down) {
return is_shift_down ? capture_mode::kShiftArrowKeyboardRegionChangeDp
: capture_mode::kArrowKeyboardRegionChangeDp;
}
// Clips |out_bounds| to fit |rect|. Similar to
// gfx::Rect::AdjustToFit() but does not shift the output rect to maintain the
// rect size.
void ClipRectToFit(gfx::Rect* out_bounds, const gfx::Rect& rect) {
out_bounds->SetByBounds(std::max(rect.x(), out_bounds->x()),
std::max(rect.y(), out_bounds->y()),
std::min(rect.right(), out_bounds->right()),
std::min(rect.bottom(), out_bounds->bottom()));
}
} // namespace } // namespace
class CaptureModeSession::CursorSetter { class CaptureModeSession::CursorSetter {
...@@ -521,17 +546,82 @@ void CaptureModeSession::OnKeyEvent(ui::KeyEvent* event) { ...@@ -521,17 +546,82 @@ void CaptureModeSession::OnKeyEvent(ui::KeyEvent* event) {
if (event->type() != ui::ET_KEY_PRESSED) if (event->type() != ui::ET_KEY_PRESSED)
return; return;
if (event->key_code() == ui::VKEY_ESCAPE) { ui::KeyboardCode key_code = event->key_code();
event->StopPropagation(); switch (key_code) {
controller_->Stop(); // |this| is destroyed here. case ui::VKEY_ESCAPE:
return; event->StopPropagation();
} controller_->Stop(); // |this| is destroyed here.
return;
if (event->key_code() == ui::VKEY_RETURN) { case ui::VKEY_RETURN:
event->StopPropagation(); event->StopPropagation();
if (!IsInCountDownAnimation()) if (!IsInCountDownAnimation())
controller_->PerformCapture(); // |this| is destroyed here. controller_->PerformCapture(); // |this| is destroyed here.
return; return;
case ui::VKEY_SPACE:
event->StopPropagation();
event->SetHandled();
if (controller_->source() == CaptureModeSource::kRegion)
SelectDefaultRegion();
return;
case ui::VKEY_TAB: {
// Eat tab events always to prevent application windows from getting them.
event->StopPropagation();
event->SetHandled();
if (!is_selecting_region_ &&
controller_->source() == CaptureModeSource::kRegion) {
// Update the position to the next one in |tabbing_order| and then
// schedule a paint to repaint the focus. |kNone| means nothing has
// keyboard focus, and arrow keys will have no effect.
// TODO(richui|sammiequon): Once the capture bar and button are
// focusable, create a class which handles tabbing for all of capture
// session.
static const std::vector<FineTunePosition> tabbing_order = {
FineTunePosition::kNone, FineTunePosition::kCenter,
FineTunePosition::kTopLeft, FineTunePosition::kTopCenter,
FineTunePosition::kTopRight, FineTunePosition::kRightCenter,
FineTunePosition::kBottomRight, FineTunePosition::kBottomCenter,
FineTunePosition::kBottomLeft, FineTunePosition::kLeftCenter};
auto it = std::find(tabbing_order.begin(), tabbing_order.end(),
focused_fine_tune_position_);
DCHECK(it != tabbing_order.end());
int index = it - tabbing_order.begin();
const int array_size = int{tabbing_order.size()};
// Adding |array_size| ensures if |index| starts at 0 and decrements we
// wrap around and get n-1 as expected. For example, -1 % 5 returns -1,
// but what we want is 4.
index = ((index + array_size + (event->IsShiftDown() ? -1 : 1)) %
array_size);
focused_fine_tune_position_ = tabbing_order[index];
RepaintRegion();
}
return;
}
case ui::VKEY_UP:
case ui::VKEY_DOWN: {
event->StopPropagation();
event->SetHandled();
UpdateRegionVertically(/*up=*/key_code == ui::VKEY_UP,
event->IsShiftDown());
return;
}
case ui::VKEY_LEFT:
case ui::VKEY_RIGHT: {
event->StopPropagation();
event->SetHandled();
UpdateRegionHorizontally(/*left=*/key_code == ui::VKEY_LEFT,
event->IsShiftDown());
return;
}
default:
return;
} }
} }
...@@ -674,11 +764,38 @@ void CaptureModeSession::PaintCaptureRegion(gfx::Canvas* canvas) { ...@@ -674,11 +764,38 @@ void CaptureModeSession::PaintCaptureRegion(gfx::Canvas* canvas) {
border_flags.setLooper(gfx::CreateShadowDrawLooper({kRegionOutlineShadow})); border_flags.setLooper(gfx::CreateShadowDrawLooper({kRegionOutlineShadow}));
canvas->DrawRect(gfx::RectF(region), border_flags); canvas->DrawRect(gfx::RectF(region), border_flags);
if (is_selecting_region_) // Draws the focus ring if the region or one of the affordance circles
return; // currently has focus.
auto maybe_draw_focus_ring = [&canvas, &region](FineTunePosition position) {
if (position == FineTunePosition::kNone)
return;
if (capture_mode_util::ShouldHideDragAffordance(fine_tune_position_)) cc::PaintFlags focus_ring_flags;
focus_ring_flags.setColor(AshColorProvider::Get()->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kFocusRingColor));
focus_ring_flags.setStyle(cc::PaintFlags::kStroke_Style);
focus_ring_flags.setStrokeWidth(kFocusRingStrokeWidthDp);
if (position == FineTunePosition::kCenter) {
gfx::RectF focus_rect(region);
focus_rect.Inset(
gfx::InsetsF(-kFocusRingSpacingDp - kFocusRingStrokeWidthDp / 2));
canvas->DrawRect(focus_rect, focus_ring_flags);
return;
}
const int radius = kAffordanceCircleRadiusDp + kFocusRingSpacingDp +
kFocusRingStrokeWidthDp / 2;
canvas->DrawCircle(
capture_mode_util::GetLocationForFineTunePosition(region, position),
radius, focus_ring_flags);
};
if (is_selecting_region_ ||
capture_mode_util::ShouldHideDragAffordance(fine_tune_position_)) {
maybe_draw_focus_ring(focused_fine_tune_position_);
return; return;
}
// Draw the drag affordance circles. // Draw the drag affordance circles.
cc::PaintFlags circle_flags; cc::PaintFlags circle_flags;
...@@ -700,6 +817,8 @@ void CaptureModeSession::PaintCaptureRegion(gfx::Canvas* canvas) { ...@@ -700,6 +817,8 @@ void CaptureModeSession::PaintCaptureRegion(gfx::Canvas* canvas) {
draw_circle(region.bottom_center()); draw_circle(region.bottom_center());
draw_circle(region.bottom_left()); draw_circle(region.bottom_left());
draw_circle(region.left_center()); draw_circle(region.left_center());
maybe_draw_focus_ring(focused_fine_tune_position_);
} }
void CaptureModeSession::OnLocatedEvent(ui::LocatedEvent* event, void CaptureModeSession::OnLocatedEvent(ui::LocatedEvent* event,
...@@ -884,11 +1003,8 @@ void CaptureModeSession::OnLocatedEventPressed( ...@@ -884,11 +1003,8 @@ void CaptureModeSession::OnLocatedEventPressed(
// In order to hide the drag affordance circles on click, we need to repaint // In order to hide the drag affordance circles on click, we need to repaint
// the capture region. // the capture region.
if (capture_mode_util::ShouldHideDragAffordance(fine_tune_position_)) { if (capture_mode_util::ShouldHideDragAffordance(fine_tune_position_))
gfx::Rect damage_region = controller_->user_capture_region(); RepaintRegion();
damage_region.Inset(gfx::Insets(-kDamageInsetDp));
layer()->SchedulePaint(damage_region);
}
if (fine_tune_position_ != FineTunePosition::kCenter && if (fine_tune_position_ != FineTunePosition::kCenter &&
fine_tune_position_ != FineTunePosition::kNone) { fine_tune_position_ != FineTunePosition::kNone) {
...@@ -958,9 +1074,7 @@ void CaptureModeSession::OnLocatedEventReleased( ...@@ -958,9 +1074,7 @@ void CaptureModeSession::OnLocatedEventReleased(
EndSelection(is_event_on_capture_bar, region_intersects_capture_bar); EndSelection(is_event_on_capture_bar, region_intersects_capture_bar);
// Do a repaint to show the affordance circles. // Do a repaint to show the affordance circles.
gfx::Rect damage_region = controller_->user_capture_region(); RepaintRegion();
damage_region.Inset(gfx::Insets(-kDamageInsetDp));
layer()->SchedulePaint(damage_region);
if (!is_selecting_region_) if (!is_selecting_region_)
return; return;
...@@ -1430,4 +1544,99 @@ void CaptureModeSession::EndSelection(bool is_event_on_capture_bar, ...@@ -1430,4 +1544,99 @@ void CaptureModeSession::EndSelection(bool is_event_on_capture_bar,
CloseMagnifierGlass(); CloseMagnifierGlass();
} }
void CaptureModeSession::RepaintRegion() {
gfx::Rect damage_region = controller_->user_capture_region();
damage_region.Inset(gfx::Insets(-kDamageInsetDp));
layer()->SchedulePaint(damage_region);
}
void CaptureModeSession::SelectDefaultRegion() {
is_selecting_region_ = false;
// Default is centered in the root, and its width and height are
// |kRegionDefaultRatio| size of the root.
gfx::Rect default_capture_region = current_root_->bounds();
default_capture_region.ClampToCenteredSize(gfx::ScaleToCeiledSize(
default_capture_region.size(), kRegionDefaultRatio));
UpdateCaptureRegion(default_capture_region, /*is_resizing=*/false);
}
void CaptureModeSession::UpdateRegionHorizontally(bool left,
bool is_shift_down) {
if (focused_fine_tune_position_ == FineTunePosition::kNone ||
focused_fine_tune_position_ == FineTunePosition::kTopCenter ||
focused_fine_tune_position_ == FineTunePosition::kBottomCenter) {
return;
}
const int change = GetArrowKeyPressChange(is_shift_down);
gfx::Rect new_capture_region = controller_->user_capture_region();
if (focused_fine_tune_position_ == FineTunePosition::kCenter) {
new_capture_region.Offset(left ? -change : change, 0);
new_capture_region.AdjustToFit(current_root_->bounds());
} else {
const gfx::Point location =
capture_mode_util::GetLocationForFineTunePosition(
new_capture_region, focused_fine_tune_position_);
// If an affordance circle on the left side of the capture region is
// focused, left presses will enlarge the existing region and right presses
// will shrink the existing region. If it is on the right side, right
// presses will enlarge and left presses will shrink.
const bool affordance_on_left = location.x() == new_capture_region.x();
const bool shrink = affordance_on_left ^ left;
if (shrink && new_capture_region.width() < change)
return;
const int inset = shrink ? change : -change;
gfx::Insets insets(0, affordance_on_left ? inset : 0, 0,
affordance_on_left ? 0 : inset);
new_capture_region.Inset(insets);
ClipRectToFit(&new_capture_region, current_root_->bounds());
}
UpdateCaptureRegion(new_capture_region, /*is_resizing=*/false);
}
void CaptureModeSession::UpdateRegionVertically(bool up, bool is_shift_down) {
if (focused_fine_tune_position_ == FineTunePosition::kNone ||
focused_fine_tune_position_ == FineTunePosition::kLeftCenter ||
focused_fine_tune_position_ == FineTunePosition::kRightCenter) {
return;
}
const int change = GetArrowKeyPressChange(is_shift_down);
gfx::Rect new_capture_region = controller_->user_capture_region();
// TODO(sammiequon): The below is similar to UpdateRegionHorizontally() except
// we are acting on the y-axis. Investigate if we can remove the duplication.
if (focused_fine_tune_position_ == FineTunePosition::kCenter) {
new_capture_region.Offset(0, up ? -change : change);
new_capture_region.AdjustToFit(current_root_->bounds());
} else {
const gfx::Point location =
capture_mode_util::GetLocationForFineTunePosition(
new_capture_region, focused_fine_tune_position_);
// If an affordance circle on the top side of the capture region is
// focused, up presses will enlarge the existing region and down presses
// will shrink the existing region. If it is on the bottom side, down
// presses will enlarge and up presses will shrink.
const bool affordance_on_top = location.y() == new_capture_region.y();
const bool shrink = affordance_on_top ^ up;
if (shrink && new_capture_region.height() < change)
return;
const int inset = shrink ? change : -change;
gfx::Insets insets(affordance_on_top ? inset : 0, 0,
affordance_on_top ? 0 : inset, 0);
new_capture_region.Inset(insets);
ClipRectToFit(&new_capture_region, current_root_->bounds());
}
UpdateCaptureRegion(new_capture_region, /*is_resizing=*/false);
}
} // namespace ash } // namespace ash
...@@ -217,6 +217,19 @@ class ASH_EXPORT CaptureModeSession : public ui::LayerOwner, ...@@ -217,6 +217,19 @@ class ASH_EXPORT CaptureModeSession : public ui::LayerOwner,
void EndSelection(bool is_event_on_capture_bar, void EndSelection(bool is_event_on_capture_bar,
bool region_intersects_capture_bar); bool region_intersects_capture_bar);
// Schedules a paint on the region and enough inset around it so that the
// shadow, affordance circles, etc. are all repainted.
void RepaintRegion();
// Selects a default region that is centered and whose size is a ratio of the
// root window bounds. Called when the space key is pressed.
void SelectDefaultRegion();
// Updates the region either horizontally or vertically. Called when the arrow
// keys are pressed.
void UpdateRegionHorizontally(bool left, bool is_shift_down);
void UpdateRegionVertically(bool up, bool is_shift_down);
CaptureModeController* const controller_; CaptureModeController* const controller_;
// The current root window on which the capture session is active, which may // The current root window on which the capture session is active, which may
...@@ -286,6 +299,10 @@ class ASH_EXPORT CaptureModeSession : public ui::LayerOwner, ...@@ -286,6 +299,10 @@ class ASH_EXPORT CaptureModeSession : public ui::LayerOwner,
// True if at any point during the lifetime of |this|, the capture source // True if at any point during the lifetime of |this|, the capture source
// changed. Used for metrics collection. // changed. Used for metrics collection.
bool capture_source_changed_ = false; bool capture_source_changed_ = false;
// The current focused fine tune position. This changes as user tabs while a
// in capture region mode.
FineTunePosition focused_fine_tune_position_ = FineTunePosition::kNone;
}; };
} // namespace ash } // namespace ash
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "ash/capture_mode/capture_mode_bar_view.h" #include "ash/capture_mode/capture_mode_bar_view.h"
#include "ash/capture_mode/capture_mode_button.h" #include "ash/capture_mode/capture_mode_button.h"
#include "ash/capture_mode/capture_mode_constants.h"
#include "ash/capture_mode/capture_mode_controller.h" #include "ash/capture_mode/capture_mode_controller.h"
#include "ash/capture_mode/capture_mode_metrics.h" #include "ash/capture_mode/capture_mode_metrics.h"
#include "ash/capture_mode/capture_mode_session.h" #include "ash/capture_mode/capture_mode_session.h"
...@@ -71,9 +72,11 @@ void ClickOnView(const views::View* view, ...@@ -71,9 +72,11 @@ void ClickOnView(const views::View* view,
} }
void SendKey(ui::KeyboardCode key_code, void SendKey(ui::KeyboardCode key_code,
ui::test::EventGenerator* event_generator) { ui::test::EventGenerator* event_generator,
event_generator->PressKey(key_code, /*flags=*/0); bool shift_down = false) {
event_generator->ReleaseKey(key_code, /*flags=*/0); int flags = shift_down ? ui::EF_SHIFT_DOWN : 0;
event_generator->PressKey(key_code, flags);
event_generator->ReleaseKey(key_code, flags);
} }
// Moves the mouse and updates the cursor's display manually to imitate what a // Moves the mouse and updates the cursor's display manually to imitate what a
...@@ -1945,6 +1948,68 @@ TEST_F(CaptureModeTest, ReenterOnSmallerDisplay) { ...@@ -1945,6 +1948,68 @@ TEST_F(CaptureModeTest, ReenterOnSmallerDisplay) {
EXPECT_EQ(gfx::Rect(600, 400), controller->user_capture_region()); EXPECT_EQ(gfx::Rect(600, 400), controller->user_capture_region());
} }
// Tests that functionality to create and adjust a region with keyboard
// shortcuts works as intended.
TEST_F(CaptureModeTest, SelectRegionWithKeyboard) {
auto* controller = StartImageRegionCapture();
auto* event_generator = GetEventGenerator();
ASSERT_TRUE(controller->user_capture_region().IsEmpty());
// Test that hitting space will create a default region.
SendKey(ui::VKEY_SPACE, event_generator);
gfx::Rect capture_region = controller->user_capture_region();
EXPECT_FALSE(capture_region.IsEmpty());
// Test that hitting an arrow key will do nothing as nothing is focused
// initially.
SendKey(ui::VKEY_RIGHT, event_generator);
EXPECT_EQ(capture_region, controller->user_capture_region());
const int arrow_shift = capture_mode::kArrowKeyboardRegionChangeDp;
// Hit tab so that the whole region is focused. Arrow keys should shift the
// whole region.
SendKey(ui::VKEY_TAB, event_generator);
SendKey(ui::VKEY_RIGHT, event_generator);
EXPECT_EQ(capture_region.origin() + gfx::Vector2d(arrow_shift, 0),
controller->user_capture_region().origin());
EXPECT_EQ(capture_region.size(), controller->user_capture_region().size());
SendKey(ui::VKEY_RIGHT, event_generator, /*shift_down=*/true);
EXPECT_EQ(
capture_region.origin() +
gfx::Vector2d(
arrow_shift + capture_mode::kShiftArrowKeyboardRegionChangeDp, 0),
controller->user_capture_region().origin());
EXPECT_EQ(capture_region.size(), controller->user_capture_region().size());
// Hit tab so that the top left affordance circle is focused. Left and up keys
// should enlarge the region, right and bottom keys should shrink the region.
capture_region = controller->user_capture_region();
SendKey(ui::VKEY_TAB, event_generator);
SendKey(ui::VKEY_LEFT, event_generator);
SendKey(ui::VKEY_UP, event_generator);
EXPECT_EQ(capture_region.size() + gfx::Size(arrow_shift, arrow_shift),
controller->user_capture_region().size());
SendKey(ui::VKEY_RIGHT, event_generator);
SendKey(ui::VKEY_DOWN, event_generator);
EXPECT_EQ(capture_region.size(), controller->user_capture_region().size());
// Tab until we focus the bottom right affordance circle. Left and up keys
// should shrink the region, right and bottom keys should enlarge the region.
SendKey(ui::VKEY_TAB, event_generator);
SendKey(ui::VKEY_TAB, event_generator);
SendKey(ui::VKEY_TAB, event_generator);
SendKey(ui::VKEY_TAB, event_generator);
SendKey(ui::VKEY_LEFT, event_generator);
SendKey(ui::VKEY_UP, event_generator);
EXPECT_EQ(capture_region.size() - gfx::Size(arrow_shift, arrow_shift),
controller->user_capture_region().size());
SendKey(ui::VKEY_RIGHT, event_generator);
SendKey(ui::VKEY_DOWN, event_generator);
EXPECT_EQ(capture_region.size(), controller->user_capture_region().size());
}
// A test class that uses a mock time task environment. // A test class that uses a mock time task environment.
class CaptureModeMockTimeTest : public CaptureModeTest { class CaptureModeMockTimeTest : public CaptureModeTest {
public: public:
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
#include "shell_tab_handler.h" #include "shell_tab_handler.h"
#include "ash/capture_mode/capture_mode_controller.h"
#include "ash/focus_cycler.h" #include "ash/focus_cycler.h"
#include "ash/public/cpp/ash_features.h"
#include "ash/shelf/shelf.h" #include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_navigation_widget.h" #include "ash/shelf/shelf_navigation_widget.h"
#include "ash/shell.h" #include "ash/shell.h"
...@@ -27,6 +29,12 @@ void ShellTabHandler::OnKeyEvent(ui::KeyEvent* key_event) { ...@@ -27,6 +29,12 @@ void ShellTabHandler::OnKeyEvent(ui::KeyEvent* key_event) {
return; return;
} }
// Capture session will process their own tab events.
if (features::IsCaptureModeEnabled() &&
CaptureModeController::Get()->IsActive()) {
return;
}
aura::Window* root_window_for_new_windows = aura::Window* root_window_for_new_windows =
Shell::GetRootWindowForNewWindows(); Shell::GetRootWindowForNewWindows();
......
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