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

Unified Diff: components/exo/shell_surface.cc

Issue 2508563002: Make the arc++ fullscreen as immersive fullscreen (Closed)
Patch Set: Make the arc++ fullscreen as immersive fullscreen Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface.cc
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index 2811720b5f539457fa0e57e307e7fc6b023eb61d..0349d853a65546d81627c41b606e77464860f159 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -56,9 +56,6 @@ const struct Accelerator {
{ui::VKEY_F4, ui::EF_ALT_DOWN}};
void UpdateShelfStateForFullscreenChange(views::Widget* widget) {
- ash::wm::WindowState* window_state =
- ash::wm::GetWindowState(widget->GetNativeWindow());
- window_state->set_hide_shelf_when_fullscreen(false);
for (ash::WmWindow* root_window : ash::WmShell::Get()->GetAllRootWindows())
ash::WmShelf::ForWindow(root_window)->UpdateVisibilityState();
}
@@ -167,6 +164,9 @@ class CustomWindowStateDelegate : public ash::wm::WindowStateDelegate,
if (widget_) {
bool enter_fullscreen = !window_state->IsFullscreen();
widget_->SetFullscreen(enter_fullscreen);
+ ash::wm::WindowState* window_state =
+ ash::wm::GetWindowState(widget_->GetNativeWindow());
+ window_state->set_in_immersive_fullscreen(enter_fullscreen);
UpdateShelfStateForFullscreenChange(widget_);
}
return true;
@@ -1049,6 +1049,9 @@ void ShellSurface::CreateShellSurfaceWidget(ui::WindowShowState show_state) {
widget_->set_movement_disabled(!initial_bounds_.IsEmpty());
window_state->set_ignore_keyboard_bounds_change(!initial_bounds_.IsEmpty());
+ // AutoHide shelf in fullscreen state.
+ window_state->set_hide_shelf_when_fullscreen(false);
+
// Allow Ash to manage the position of a top-level shell surfaces if show
// state is one that allows auto positioning and |initial_bounds_| has
// not been set.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698