| OLD | NEW |
| 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/aura/wm_window_aura.h" | |
| 6 #include "ash/common/accessibility_types.h" | 5 #include "ash/common/accessibility_types.h" |
| 7 #include "ash/common/shelf/shelf_layout_manager.h" | 6 #include "ash/common/shelf/shelf_layout_manager.h" |
| 8 #include "ash/common/shelf/wm_shelf.h" | 7 #include "ash/common/shelf/wm_shelf.h" |
| 8 #include "ash/common/wm_window.h" |
| 9 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
| 10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| 11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 13 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 14 #include "chrome/browser/chromeos/accessibility/chromevox_panel.h" | 14 #include "chrome/browser/chromeos/accessibility/chromevox_panel.h" |
| 15 #include "chrome/browser/data_use_measurement/data_use_web_contents_observer.h" | 15 #include "chrome/browser/data_use_measurement/data_use_web_contents_observer.h" |
| 16 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" | 16 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
| 17 #include "chrome/common/extensions/extension_constants.h" | 17 #include "chrome/common/extensions/extension_constants.h" |
| 18 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 widget_->Close(); | 113 widget_->Close(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void ChromeVoxPanel::DidFirstVisuallyNonEmptyPaint() { | 116 void ChromeVoxPanel::DidFirstVisuallyNonEmptyPaint() { |
| 117 widget_->Show(); | 117 widget_->Show(); |
| 118 UpdatePanelHeight(); | 118 UpdatePanelHeight(); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void ChromeVoxPanel::UpdatePanelHeight() { | 121 void ChromeVoxPanel::UpdatePanelHeight() { |
| 122 ash::WmShelf* shelf = | 122 ash::WmShelf* shelf = |
| 123 ash::WmShelf::ForWindow(ash::WmWindowAura::Get(GetRootWindow())); | 123 ash::WmShelf::ForWindow(ash::WmWindow::Get(GetRootWindow())); |
| 124 if (!shelf->IsShelfInitialized()) | 124 if (!shelf->IsShelfInitialized()) |
| 125 return; | 125 return; |
| 126 | 126 |
| 127 ash::ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager(); | 127 ash::ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager(); |
| 128 if (shelf_layout_manager) | 128 if (shelf_layout_manager) |
| 129 shelf_layout_manager->SetChromeVoxPanelHeight(kPanelHeight); | 129 shelf_layout_manager->SetChromeVoxPanelHeight(kPanelHeight); |
| 130 } | 130 } |
| 131 | 131 |
| 132 void ChromeVoxPanel::EnterFullscreen() { | 132 void ChromeVoxPanel::EnterFullscreen() { |
| 133 Focus(); | 133 Focus(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // If we're in full-screen mode, give the panel a height of 0 unless | 182 // If we're in full-screen mode, give the panel a height of 0 unless |
| 183 // it's active. | 183 // it's active. |
| 184 if (ash::GetRootWindowController(GetRootWindow()) | 184 if (ash::GetRootWindowController(GetRootWindow()) |
| 185 ->GetWindowForFullscreenMode() && | 185 ->GetWindowForFullscreenMode() && |
| 186 !widget_->IsActive()) { | 186 !widget_->IsActive()) { |
| 187 bounds.set_height(0); | 187 bounds.set_height(0); |
| 188 } | 188 } |
| 189 | 189 |
| 190 widget_->SetBounds(bounds); | 190 widget_->SetBounds(bounds); |
| 191 } | 191 } |
| OLD | NEW |