| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" | 5 #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/wm/window_state.h" | 8 #include "ash/common/wm/window_state.h" |
| 9 #include "ash/shared/immersive_revealed_lock.h" | 9 #include "ash/shared/immersive_revealed_lock.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 return; | 217 return; |
| 218 | 218 |
| 219 DCHECK(!mash_reveal_widget_); | 219 DCHECK(!mash_reveal_widget_); |
| 220 mash_reveal_widget_ = base::MakeUnique<views::Widget>(); | 220 mash_reveal_widget_ = base::MakeUnique<views::Widget>(); |
| 221 views::Widget::InitParams init_params(views::Widget::InitParams::TYPE_POPUP); | 221 views::Widget::InitParams init_params(views::Widget::InitParams::TYPE_POPUP); |
| 222 init_params.mus_properties | 222 init_params.mus_properties |
| 223 [ui::mojom::WindowManager::kRenderParentTitleArea_Property] = | 223 [ui::mojom::WindowManager::kRenderParentTitleArea_Property] = |
| 224 mojo::ConvertTo<std::vector<uint8_t>>( | 224 mojo::ConvertTo<std::vector<uint8_t>>( |
| 225 static_cast<aura::PropertyConverter::PrimitiveType>(true)); | 225 static_cast<aura::PropertyConverter::PrimitiveType>(true)); |
| 226 init_params.mus_properties | 226 init_params.mus_properties |
| 227 [ui::mojom::WindowManager::kWindowIgnoredByShelf_Property] = | 227 [ui::mojom::WindowManager::kWindowIgnoredByShelf_InitProperty] = |
| 228 mojo::ConvertTo<std::vector<uint8_t>>(true); | 228 mojo::ConvertTo<std::vector<uint8_t>>(true); |
| 229 init_params.name = "ChromeImmersiveRevealWindow"; | 229 init_params.name = "ChromeImmersiveRevealWindow"; |
| 230 // We want events to fall through to the real views. | 230 // We want events to fall through to the real views. |
| 231 init_params.accept_events = false; | 231 init_params.accept_events = false; |
| 232 init_params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 232 init_params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 233 init_params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; | 233 init_params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; |
| 234 init_params.parent = native_window_->GetRootWindow(); | 234 init_params.parent = native_window_->GetRootWindow(); |
| 235 // The widget needs to be translucent so the frame decorations drawn by the | 235 // The widget needs to be translucent so the frame decorations drawn by the |
| 236 // window manager are visible. | 236 // window manager are visible. |
| 237 init_params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 237 init_params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 const void* key, | 355 const void* key, |
| 356 intptr_t old) { | 356 intptr_t old) { |
| 357 // In mash the window manager may move us out of immersive mode by changing | 357 // In mash the window manager may move us out of immersive mode by changing |
| 358 // the show state. When this happens notify the controller. | 358 // the show state. When this happens notify the controller. |
| 359 DCHECK(chrome::IsRunningInMash()); | 359 DCHECK(chrome::IsRunningInMash()); |
| 360 if (key == aura::client::kShowStateKey && | 360 if (key == aura::client::kShowStateKey && |
| 361 !browser_view_->GetWidget()->IsFullscreen()) { | 361 !browser_view_->GetWidget()->IsFullscreen()) { |
| 362 SetEnabled(false); | 362 SetEnabled(false); |
| 363 } | 363 } |
| 364 } | 364 } |
| OLD | NEW |