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

Side by Side Diff: chrome/browser/chromeos/accessibility/chromevox_panel.cc

Issue 1696443002: Re-land: Implement ChromeVox Next menus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 #include "ash/shell.h" 6 #include "ash/shell.h"
7 #include "ash/shell_window_ids.h" 7 #include "ash/shell_window_ids.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 9 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
10 #include "chrome/browser/chromeos/accessibility/chromevox_panel.h" 10 #include "chrome/browser/chromeos/accessibility/chromevox_panel.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 105
106 void ChromeVoxPanel::DidFirstVisuallyNonEmptyPaint() { 106 void ChromeVoxPanel::DidFirstVisuallyNonEmptyPaint() {
107 widget_->Show(); 107 widget_->Show();
108 ash::ShelfLayoutManager::ForShelf(GetRootWindow()) 108 ash::ShelfLayoutManager::ForShelf(GetRootWindow())
109 ->SetChromeVoxPanelHeight(kPanelHeight); 109 ->SetChromeVoxPanelHeight(kPanelHeight);
110 } 110 }
111 111
112 void ChromeVoxPanel::EnterFullscreen() { 112 void ChromeVoxPanel::EnterFullscreen() {
113 fullscreen_ = true; 113 fullscreen_ = true;
114 widget_->widget_delegate()->set_can_activate(true);
115 widget_->Activate();
116 web_view_->RequestFocus();
114 UpdateWidgetBounds(); 117 UpdateWidgetBounds();
115 } 118 }
116 119
117 void ChromeVoxPanel::ExitFullscreen() { 120 void ChromeVoxPanel::ExitFullscreen() {
121 widget_->widget_delegate()->set_can_activate(false);
118 fullscreen_ = false; 122 fullscreen_ = false;
119 UpdateWidgetBounds(); 123 UpdateWidgetBounds();
120 } 124 }
121 125
122 void ChromeVoxPanel::DisableSpokenFeedback() { 126 void ChromeVoxPanel::DisableSpokenFeedback() {
123 chromeos::AccessibilityManager::Get()->EnableSpokenFeedback( 127 chromeos::AccessibilityManager::Get()->EnableSpokenFeedback(
124 false, ui::A11Y_NOTIFICATION_NONE); 128 false, ui::A11Y_NOTIFICATION_NONE);
125 } 129 }
126 130
127 const views::Widget* ChromeVoxPanel::GetWidget() const { 131 const views::Widget* ChromeVoxPanel::GetWidget() const {
(...skipping 16 matching lines...) Expand all
144 uint32_t changed_metrics) { 148 uint32_t changed_metrics) {
145 UpdateWidgetBounds(); 149 UpdateWidgetBounds();
146 } 150 }
147 151
148 void ChromeVoxPanel::UpdateWidgetBounds() { 152 void ChromeVoxPanel::UpdateWidgetBounds() {
149 gfx::Rect bounds(GetRootWindow()->bounds().size()); 153 gfx::Rect bounds(GetRootWindow()->bounds().size());
150 if (!fullscreen_) 154 if (!fullscreen_)
151 bounds.set_height(kPanelHeight); 155 bounds.set_height(kPanelHeight);
152 widget_->SetBounds(bounds); 156 widget_->SetBounds(bounds);
153 } 157 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698