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

Side by Side Diff: chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc

Issue 13315002: Add in gesture for immersive mode (Closed) Base URL: https://codereview.chromium.org/12529026/
Patch Set: Rebasing Created 7 years, 8 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 | « ash/wm/window_properties.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/wm/window_properties.h" 9 #include "ash/wm/window_properties.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 intptr_t old) OVERRIDE { 101 intptr_t old) OVERRIDE {
102 using aura::client::kShowStateKey; 102 using aura::client::kShowStateKey;
103 if (key == kShowStateKey) { 103 if (key == kShowStateKey) {
104 // Disable immersive mode when leaving the fullscreen state. 104 // Disable immersive mode when leaving the fullscreen state.
105 if (window->GetProperty(kShowStateKey) != ui::SHOW_STATE_FULLSCREEN) 105 if (window->GetProperty(kShowStateKey) != ui::SHOW_STATE_FULLSCREEN)
106 controller_->SetEnabled(false); 106 controller_->SetEnabled(false);
107 return; 107 return;
108 } 108 }
109 using ash::internal::kImmersiveModeKey; 109 using ash::internal::kImmersiveModeKey;
110 if (key == kImmersiveModeKey) { 110 if (key == kImmersiveModeKey) {
111 // Another component has toggled immersive mode.
112 controller_->SetEnabled(window->GetProperty(kImmersiveModeKey)); 111 controller_->SetEnabled(window->GetProperty(kImmersiveModeKey));
113 return; 112 return;
114 } 113 }
114 using ash::internal::kPendingImmersiveGestureKey;
115 if (key == kPendingImmersiveGestureKey) {
116 if (window->GetProperty(kPendingImmersiveGestureKey)) {
117 window->SetProperty(kPendingImmersiveGestureKey, false);
118 controller_->MaybeStartReveal();
119 }
120 return;
121 }
115 } 122 }
116 123
117 private: 124 private:
118 ImmersiveModeControllerAsh* controller_; // Not owned. 125 ImmersiveModeControllerAsh* controller_; // Not owned.
119 126
120 DISALLOW_COPY_AND_ASSIGN(WindowObserver); 127 DISALLOW_COPY_AND_ASSIGN(WindowObserver);
121 }; 128 };
122 129
123 //////////////////////////////////////////////////////////////////////////////// 130 ////////////////////////////////////////////////////////////////////////////////
124 131
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 if (reveal_state_ == SLIDING_CLOSED) { 613 if (reveal_state_ == SLIDING_CLOSED) {
607 reveal_state_ = CLOSED; 614 reveal_state_ = CLOSED;
608 TopContainerView* top_container = browser_view_->top_container(); 615 TopContainerView* top_container = browser_view_->top_container();
609 // Layer isn't needed after animation completes. 616 // Layer isn't needed after animation completes.
610 top_container->SetFillsBoundsOpaquely(false); 617 top_container->SetFillsBoundsOpaquely(false);
611 top_container->SetPaintToLayer(false); 618 top_container->SetPaintToLayer(false);
612 // Update tabstrip for closed state. 619 // Update tabstrip for closed state.
613 LayoutBrowserView(true); 620 LayoutBrowserView(true);
614 } 621 }
615 } 622 }
OLDNEW
« no previous file with comments | « ash/wm/window_properties.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698