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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 window_properties | 235 window_properties |
236 [ui::mojom::WindowManager::kRendererParentTitleArea_Property] = | 236 [ui::mojom::WindowManager::kRendererParentTitleArea_Property] = |
237 mojo::ConvertTo<std::vector<uint8_t>>(true); | 237 mojo::ConvertTo<std::vector<uint8_t>>(true); |
238 window_properties[ui::mojom::WindowManager::kName_Property] = | 238 window_properties[ui::mojom::WindowManager::kName_Property] = |
239 mojo::ConvertTo<std::vector<uint8_t>>( | 239 mojo::ConvertTo<std::vector<uint8_t>>( |
240 std::string("ChromeImmersiveRevealWindow")); | 240 std::string("ChromeImmersiveRevealWindow")); |
241 init_params.native_widget = new views::NativeWidgetMus( | 241 init_params.native_widget = new views::NativeWidgetMus( |
242 mash_reveal_widget_.get(), | 242 mash_reveal_widget_.get(), |
243 views::WindowManagerConnection::Get()->client()->NewWindow( | 243 views::WindowManagerConnection::Get()->client()->NewWindow( |
244 &window_properties), | 244 &window_properties), |
245 ui::mojom::SurfaceType::DEFAULT); | 245 ui::mojom::CompositorFrameSinkType::DEFAULT); |
246 init_params.accept_events = false; | 246 init_params.accept_events = false; |
247 init_params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 247 init_params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
248 init_params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; | 248 init_params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; |
249 init_params.parent_mus = GetMusWindow(native_window_); | 249 init_params.parent_mus = GetMusWindow(native_window_); |
250 const gfx::Rect& top_container_bounds = | 250 const gfx::Rect& top_container_bounds = |
251 browser_view_->top_container()->bounds(); | 251 browser_view_->top_container()->bounds(); |
252 init_params.bounds = | 252 init_params.bounds = |
253 gfx::Rect(0, -top_container_bounds.height(), top_container_bounds.width(), | 253 gfx::Rect(0, -top_container_bounds.height(), top_container_bounds.width(), |
254 top_container_bounds.height()); | 254 top_container_bounds.height()); |
255 mash_reveal_widget_->Init(init_params); | 255 mash_reveal_widget_->Init(init_params); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 // the shelf completely and prevent it from being revealed. | 358 // the shelf completely and prevent it from being revealed. |
359 bool in_tab_fullscreen = content::Source<FullscreenController>(source)-> | 359 bool in_tab_fullscreen = content::Source<FullscreenController>(source)-> |
360 IsWindowFullscreenForTabOrPending(); | 360 IsWindowFullscreenForTabOrPending(); |
361 ash::wm::GetWindowState(native_window_) | 361 ash::wm::GetWindowState(native_window_) |
362 ->set_hide_shelf_when_fullscreen(in_tab_fullscreen); | 362 ->set_hide_shelf_when_fullscreen(in_tab_fullscreen); |
363 ash::Shell::GetInstance()->UpdateShelfVisibility(); | 363 ash::Shell::GetInstance()->UpdateShelfVisibility(); |
364 | 364 |
365 if (tab_indicator_visibility_changed) | 365 if (tab_indicator_visibility_changed) |
366 LayoutBrowserRootView(); | 366 LayoutBrowserRootView(); |
367 } | 367 } |
OLD | NEW |