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

Side by Side Diff: ash/test/ash_test_views_delegate.cc

Issue 2493923002: Select-to-speak event handler (Closed)
Patch Set: Fix presubmit warning 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
« no previous file with comments | « ash/test/ash_test_views_delegate.h ('k') | chrome/browser/chromeos/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/test/ash_test_helper.h"
5 #include "ash/test/ash_test_views_delegate.h" 6 #include "ash/test/ash_test_views_delegate.h"
6 7
7 #include "ash/shell.h" 8 #include "ash/shell.h"
8 9
9 namespace ash { 10 namespace ash {
10 namespace test { 11 namespace test {
11 12
12 AshTestViewsDelegate::AshTestViewsDelegate() {} 13 AshTestViewsDelegate::AshTestViewsDelegate() {}
13 14
14 AshTestViewsDelegate::~AshTestViewsDelegate() {} 15 AshTestViewsDelegate::~AshTestViewsDelegate() {}
15 16
16 void AshTestViewsDelegate::OnBeforeWidgetInit( 17 void AshTestViewsDelegate::OnBeforeWidgetInit(
17 views::Widget::InitParams* params, 18 views::Widget::InitParams* params,
18 views::internal::NativeWidgetDelegate* delegate) { 19 views::internal::NativeWidgetDelegate* delegate) {
19 TestViewsDelegate::OnBeforeWidgetInit(params, delegate); 20 TestViewsDelegate::OnBeforeWidgetInit(params, delegate);
20 21
21 if (!params->parent && !params->context && ash::Shell::HasInstance()) { 22 if (!params->parent && !params->context && ash::Shell::HasInstance()) {
22 // If the window has neither a parent nor a context add to the root. 23 // If the window has neither a parent nor a context add to the root.
23 params->parent = ash::Shell::GetInstance()->GetPrimaryRootWindow(); 24 params->parent = ash::Shell::GetInstance()->GetPrimaryRootWindow();
24 } 25 }
25 } 26 }
26 27
28 void AshTestViewsDelegate::NotifyAccessibilityEvent(views::View* view,
29 ui::AXEvent event_type) {
30 TestViewsDelegate::NotifyAccessibilityEvent(view, event_type);
31
32 if (test_accessibility_event_delegate_) {
33 test_accessibility_event_delegate_->NotifyAccessibilityEvent(view,
34 event_type);
35 }
36 }
37
27 } // namespace test 38 } // namespace test
28 } // namespace ash 39 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_views_delegate.h ('k') | chrome/browser/chromeos/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698