Chromium Code Reviews| Index: chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc |
| diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc |
| index 7ddfa601b40da527dc4b1944f9d312499e567d1d..c56b9b8c682fe9c6ce7916622e3104741497cf44 100644 |
| --- a/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc |
| +++ b/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc |
| @@ -4,10 +4,15 @@ |
| #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" |
| +#include <string> |
| +#include <vector> |
| + |
| #include "ash/ash_switches.h" |
| #include "ash/shell.h" |
| #include "ash/wm/window_properties.h" |
| #include "base/command_line.h" |
| +#include "base/string_number_conversions.h" |
| +#include "base/string_util.h" |
| #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" |
| #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" |
| #include "chrome/browser/ui/views/frame/top_container_view.h" |
| @@ -17,9 +22,11 @@ |
| #include "ui/aura/client/aura_constants.h" |
| #include "ui/aura/client/capture_client.h" |
| #include "ui/aura/env.h" |
| +#include "ui/aura/root_window.h" |
| #include "ui/aura/window.h" |
| #include "ui/aura/window_observer.h" |
| #include "ui/base/gestures/gesture_configuration.h" |
| +#include "ui/base/ui_base_switches.h" |
| #include "ui/compositor/layer_animation_observer.h" |
| #include "ui/compositor/scoped_layer_animation_settings.h" |
| #include "ui/gfx/screen.h" |
| @@ -347,7 +354,8 @@ ImmersiveModeControllerAsh::ImmersiveModeControllerAsh() |
| mouse_x_when_hit_top_(-1), |
| native_window_(NULL), |
| weak_ptr_factory_(this), |
| - gesture_begun_(false) { |
| + gesture_begun_(false), |
| + bezel_inset_(0) { |
|
pkotwicz
2013/05/23 03:29:35
You don't use this?
rharrison
2013/05/23 17:12:57
Done.
|
| } |
| ImmersiveModeControllerAsh::~ImmersiveModeControllerAsh() { |
| @@ -662,10 +670,11 @@ void ImmersiveModeControllerAsh::EnableWindowObservers(bool enable) { |
| focus_manager->RemoveFocusChangeListener(this); |
| } |
| + aura::RootWindow* root_window = native_window_->GetRootWindow(); |
| if (enable) |
| - native_window_->AddPreTargetHandler(this); |
| + root_window->AddPreTargetHandler(this); |
| else |
| - native_window_->RemovePreTargetHandler(this); |
| + root_window->RemovePreTargetHandler(this); |
| // The window observer adds and removes itself from the native window. |
| window_observer_.reset(enable ? new WindowObserver(this) : NULL); |
| @@ -1031,5 +1040,8 @@ bool ImmersiveModeControllerAsh::IsNearTopContainer(gfx::Point location) const { |
| gfx::Rect near_bounds = top_container_->GetTargetBoundsInScreen(); |
| if (reveal_state_ == CLOSED) |
| near_bounds.Inset(gfx::Insets(0, 0, -kNearTopContainerDistance, 0)); |
| - return near_bounds.Contains(location); |
| + return near_bounds.Contains(location) || |
| + ((location.y() < near_bounds.y()) && |
| + (location.x() >= near_bounds.x()) && |
| + (location.x() <= near_bounds.x() + near_bounds.width())); |
| } |