Chromium Code Reviews| Index: athena/wm/split_view_controller.cc |
| diff --git a/athena/wm/split_view_controller.cc b/athena/wm/split_view_controller.cc |
| index 85db209536916f46ec72f8d59b586abf056f9e4e..72696b0e1f135097b009accdd6338bcf53135891 100644 |
| --- a/athena/wm/split_view_controller.cc |
| +++ b/athena/wm/split_view_controller.cc |
| @@ -10,23 +10,191 @@ |
| #include "athena/wm/public/window_list_provider.h" |
| #include "athena/wm/public/window_manager.h" |
| #include "base/bind.h" |
| +#include "ui/aura/scoped_window_targeter.h" |
| #include "ui/aura/window.h" |
| +#include "ui/aura/window_delegate.h" |
| +#include "ui/aura/window_targeter.h" |
| +#include "ui/base/cursor/cursor.h" |
| +#include "ui/base/hit_test.h" |
| #include "ui/compositor/closure_animation_observer.h" |
| -#include "ui/compositor/layer_animation_observer.h" |
| +#include "ui/compositor/layer.h" |
| #include "ui/compositor/scoped_layer_animation_settings.h" |
| #include "ui/events/event_handler.h" |
| #include "ui/gfx/display.h" |
| #include "ui/gfx/screen.h" |
| +#include "ui/views/widget/root_view.h" |
| +#include "ui/views/widget/root_view_targeter.h" |
| +#include "ui/views/widget/widget.h" |
| #include "ui/wm/core/window_util.h" |
| +#include "ui/wm/public/window_types.h" |
| namespace athena { |
| namespace { |
| -// Returns a target transform which is suitable for animating a windows's |
| -// bounds. |
| -gfx::Transform GetTargetTransformForBoundsAnimation(const gfx::Rect& from, |
| - const gfx::Rect& to) { |
| +const int kDragHandleWidth = 4; |
| +const int kDragHandleHeight = 80; |
| +const int kDividerWidth = 6; |
| + |
| +// TODO(mfomitchev): Should this be moved to ui/views? |
| + |
| +// Always returns the same target. |
| +class StaticViewTargeterDelegate : public views::ViewTargeterDelegate { |
| + public: |
| + explicit StaticViewTargeterDelegate(views::View* target) |
| + : target_(target) {} |
| + |
| + virtual ~StaticViewTargeterDelegate() {} |
| + |
| + private: |
| + // views::ViewTargeterDelegate |
| + virtual views::View* TargetForRect( |
| + views::View* root, const gfx::Rect& rect) OVERRIDE { |
| + return target_; |
| + } |
| + |
| + // Not owned. |
| + views::View* target_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(StaticViewTargeterDelegate); |
| +}; |
| + |
| +// TODO(mfomitchev): This is a copy of EmptyWindowDelegate in |
| +// ash/root_window_controller.cc. Should we move this somewhere we can reuse in |
| +// both ash and athena? It looks like mojo::DummyDelegate could use this as |
| +// well. |
| +// Perhaps we could have ui/aura/empty_window_delegate.h or |
| +// aura::CreateEmptyWIndowDelegate() in ui/aura/window_delegate.h |
| + |
| +// A window delegate which does nothing. Used to create a window that |
| +// is a event target, but do nothing. |
| +class EmptyWindowDelegate : public aura::WindowDelegate { |
| + public: |
| + EmptyWindowDelegate() {} |
| + virtual ~EmptyWindowDelegate() {} |
| + |
| + // aura::WindowDelegate overrides: |
| + virtual gfx::Size GetMinimumSize() const OVERRIDE { |
| + return gfx::Size(); |
| + } |
| + virtual gfx::Size GetMaximumSize() const OVERRIDE { |
| + return gfx::Size(); |
| + } |
| + virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
| + const gfx::Rect& new_bounds) OVERRIDE { |
| + } |
| + virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE { |
| + return gfx::kNullCursor; |
| + } |
| + virtual int GetNonClientComponent( |
| + const gfx::Point& point) const OVERRIDE { |
| + return HTNOWHERE; |
| + } |
| + virtual bool ShouldDescendIntoChildForEventHandling( |
| + aura::Window* child, |
| + const gfx::Point& location) OVERRIDE { |
| + return false; |
| + } |
| + virtual bool CanFocus() OVERRIDE { |
| + return false; |
| + } |
| + virtual void OnCaptureLost() OVERRIDE { |
| + } |
| + virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { |
| + } |
| + virtual void OnDeviceScaleFactorChanged( |
| + float device_scale_factor) OVERRIDE { |
| + } |
| + virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {} |
|
sadrul
2014/09/15 14:32:29
Some have {} in the same line, some have these in
mfomitchev
2014/09/15 16:37:23
Done. All methods that don't do anything have {} o
|
| + virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE { |
| + delete this; |
| + } |
| + virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE { |
| + } |
| + virtual bool HasHitTestMask() const OVERRIDE { |
| + return false; |
| + } |
| + virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE {} |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(EmptyWindowDelegate); |
| + |
| +}; |
| + |
| +// Expands the effective target area of a window ensuring it is easy to touch. |
| +// If the window is big enough to begin with, there should be no change from |
| +// the default targeting behavior. |
| +class PriorityWindowTargeter : public aura::WindowTargeter, |
| + public aura::WindowObserver { |
| + public: |
| + explicit PriorityWindowTargeter(aura::Window* priority_window) |
| + : priority_window_(priority_window) { |
| + DCHECK(priority_window); |
| + priority_window->AddObserver(this); |
| + } |
| + |
| + virtual ~PriorityWindowTargeter() { |
| + priority_window_->RemoveObserver(this); |
| + } |
| + |
| + private: |
| + bool ShouldProcessEvent(ui::EventType event_type) { |
| + return event_type == ui::ET_TOUCH_PRESSED; |
| + } |
| + |
| + // aura::WindowTargeter: |
| + virtual ui::EventTarget* FindTargetForLocatedEvent( |
| + ui::EventTarget* root, |
| + ui::LocatedEvent* event) OVERRIDE { |
| + if (!priority_window_ || (event->type() != ui::ET_TOUCH_PRESSED)) |
| + return WindowTargeter::FindTargetForLocatedEvent(root, event); |
| + |
| + gfx::Rect window_bounds = priority_window_->GetBoundsInRootWindow(); |
| + gfx::Transform window_transform = priority_window_->layer()->transform(); |
| + gfx::RectF transformed_bounds_f = window_bounds; |
| + window_transform.TransformRect(&transformed_bounds_f); |
| + gfx::Rect transformed_bounds = gfx::Rect(transformed_bounds_f.x(), |
| + transformed_bounds_f.y(), |
| + transformed_bounds_f.width(), |
| + transformed_bounds_f.height()); |
| + |
| + gfx::Point window_center = transformed_bounds.CenterPoint(); |
| + gfx::Rect extension_rect = gfx::Rect( |
| + window_center.x() - kMinTouchDimension / 2, |
| + window_center.y() - kMinTouchDimension / 2, |
| + kMinTouchDimension, |
| + kMinTouchDimension); |
| + gfx::Rect extended_bounds = |
| + gfx::UnionRects(transformed_bounds, extension_rect); |
| + if (extended_bounds.Contains(event->root_location().x(), |
| + event->root_location().y())) { |
| + root->ConvertEventToTarget(priority_window_, event); |
| + return priority_window_; |
| + } |
| + |
| + return WindowTargeter::FindTargetForLocatedEvent(root, event); |
| + } |
| + |
| + // aura::WindowObserver: |
| + virtual void OnWindowDestroying(aura::Window* window) OVERRIDE { |
| + DCHECK_EQ(window, priority_window_); |
| + priority_window_->RemoveObserver(this); |
| + priority_window_ = NULL; |
| + } |
| + |
| + // Minimum dimension of a target to be comfortably touchable. |
| + // The effective touch target area of |priority_window_| gets expanded so |
| + // that it's width and height is ayt least |kMinTouchDimension|. |
| + int const kMinTouchDimension = 26; |
| + |
| + aura::Window* priority_window_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PriorityWindowTargeter); |
| +}; |
| + |
| +// Returns a target transform required to transform |from| to |to|. |
| +gfx::Transform GetTransformForBounds(const gfx::Rect& from, |
| + const gfx::Rect& to) { |
| gfx::Transform transform; |
| transform.Translate(to.x() - from.x(), to.y() - from.y()); |
| transform.Scale(to.width() / static_cast<float>(from.width()), |
| @@ -49,7 +217,8 @@ SplitViewController::SplitViewController( |
| window_list_provider_(window_list_provider), |
| left_window_(NULL), |
| right_window_(NULL), |
| - separator_position_(0), |
| + divider_position_(0), |
| + divider_widget_(NULL), |
| weak_factory_(this) { |
| } |
| @@ -94,6 +263,8 @@ void SplitViewController::ActivateSplitMode(aura::Window* left, |
| } |
| } |
| + int container_width = container_->GetBoundsInScreen().width(); |
| + divider_position_ = container_width / 2; |
| SetState(ACTIVE); |
| if (right_window_ != right) { |
| right_window_ = right; |
| @@ -103,6 +274,7 @@ void SplitViewController::ActivateSplitMode(aura::Window* left, |
| left_window_ = left; |
| container_->StackChildAtTop(left_window_); |
| } |
| + |
| UpdateLayout(true); |
| } |
| @@ -135,65 +307,166 @@ void SplitViewController::DeactivateSplitMode() { |
| left_window_ = right_window_ = NULL; |
| } |
| -gfx::Rect SplitViewController::GetLeftTargetBounds() { |
| - gfx::Rect work_area = |
| - gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().work_area(); |
| - return gfx::Rect(0, 0, container_->bounds().width() / 2, work_area.height()); |
| +void SplitViewController::InitializeDivider() { |
| + CHECK(!divider_widget_); |
| + CHECK(!divider_window_); |
| + |
| + divider_window_.reset(new aura::Window(new EmptyWindowDelegate())); |
|
sadrul
2014/09/15 14:32:29
What's the purpose of |divider_window_|?
mfomitchev
2014/09/15 16:37:23
It covers the empty space between two windows in s
sadrul
2014/09/15 16:53:31
You don't need a separate window for this. You sho
mfomitchev
2014/09/15 17:44:20
If we do that, we will steal the entire right edge
sadrul
2014/09/15 17:50:25
It still doesn't make sense to have to maintain tw
mfomitchev
2014/09/15 18:34:21
I guess we could do that..
- I guess PriorityWindo
|
| + divider_window_->SetType(ui::wm::WINDOW_TYPE_CONTROL); |
| + divider_window_->Init(aura::WINDOW_LAYER_SOLID_COLOR); |
| + divider_window_->layer()->SetColor(SK_ColorBLACK); |
| + int container_height = container_->bounds().height(); |
| + divider_window_->SetBounds( |
| + gfx::Rect(-kDividerWidth / 2, 0, kDividerWidth, container_height)); |
| + container_->AddChild(divider_window_.get()); |
| + container_->StackChildAtTop(divider_window_.get()); |
| + |
| + views::View* divider_view = CreateDragHandleView(DragHandle::HORIZONTAL, |
| + this, |
| + kDragHandleWidth, |
| + kDragHandleHeight, |
| + 1); |
| + divider_widget_ = new views::Widget(); |
| + views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL); |
| + params.parent = container_; |
| + params.accept_events = true; |
| + params.activatable = views::Widget::InitParams::ACTIVATABLE_YES; |
|
sadrul
2014/09/15 14:32:29
Make this ACTIVATABLE_NO (it should still be able
mfomitchev
2014/09/15 16:37:24
Done. Thanks.
|
| + params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| + params.bounds = gfx::Rect(-kDragHandleWidth / 2, |
| + container_height / 2 - kDragHandleHeight / 2, |
| + kDragHandleWidth, |
| + kDragHandleHeight); |
| + divider_widget_->Init(params); |
| + divider_widget_->SetContentsView(divider_view); |
| + |
| + // Install a static view targeter on the root view which always targets |
| + // divider_view. |
| + // TODO(mfomitchev,tdanderson): This may not be needed if/when the logic |
| + // in ViewTargeterDelegate::TargetForRect is changed to work better for |
| + // views that are narrow in one dimension and long in another dimension. |
| + views::internal::RootView* root_view = |
| + static_cast<views::internal::RootView*>(divider_widget_->GetRootView()); |
| + views::View* target_view = divider_view; |
| + views::ViewTargeter* targeter = new views::RootViewTargeter( |
| + new StaticViewTargeterDelegate(target_view), |
| + root_view); |
| + divider_widget_->GetRootView()->SetEventTargeter( |
| + scoped_ptr<views::ViewTargeter>(targeter)); |
|
sadrul
2014/09/15 14:32:29
|divider_view| is the only view (other than the in
mfomitchev
2014/09/15 16:37:23
It doesn't work if I remove this view targeter. It
sadrul
2014/09/15 16:53:31
This is a pretty bad bug. You should file a crbug
mfomitchev
2014/09/15 17:44:20
Done.
|
| } |
| -gfx::Rect SplitViewController::GetRightTargetBounds() { |
| - gfx::Rect work_area = |
| - gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().work_area(); |
| - int container_width = container_->bounds().width(); |
| +void SplitViewController::HideDivider() { |
| + divider_widget_->Hide(); |
| + divider_window_->Hide(); |
| + window_targeter_.reset(); |
| +} |
| + |
| +void SplitViewController::ShowDivider() { |
| + divider_widget_->Show(); |
| + divider_window_->Show(); |
| + if (!window_targeter_) { |
| + scoped_ptr<ui::EventTargeter> window_targeter = |
| + scoped_ptr<ui::EventTargeter>( |
| + new PriorityWindowTargeter(divider_widget_->GetNativeWindow())); |
| + window_targeter_.reset( |
| + new aura::ScopedWindowTargeter(container_, window_targeter.Pass())); |
| + } |
| +} |
| + |
| +gfx::Rect SplitViewController::GetLeftAreaBounds() { |
| + int container_height = container_->bounds().height(); |
| return gfx::Rect( |
| - container_width / 2, 0, container_width / 2, work_area.height()); |
| + 0, 0, divider_position_ - kDividerWidth / 2, container_height); |
| +} |
| + |
| +gfx::Rect SplitViewController::GetRightAreaBounds() { |
| + int container_width = container_->bounds().width(); |
| + int container_height = container_->bounds().height(); |
| + return gfx::Rect(divider_position_ + kDividerWidth / 2, |
| + 0, |
| + container_width - divider_position_ - kDividerWidth / 2, |
| + container_height); |
| } |
| void SplitViewController::SetState(SplitViewController::State state) { |
| if (state_ == state) |
| return; |
| + if (divider_widget_ == NULL) { |
| + InitializeDivider(); |
| + } |
| + |
| state_ = state; |
| + |
| ScreenManager::Get()->SetRotationLocked(state_ != INACTIVE); |
| + if (state == INACTIVE) |
| + HideDivider(); |
| + else |
| + ShowDivider(); |
| } |
| void SplitViewController::UpdateLayout(bool animate) { |
| CHECK(left_window_); |
| CHECK(right_window_); |
| - |
| // Splitview can be activated from SplitViewController::ActivateSplitMode or |
| // SplitViewController::ScrollEnd. Additionally we don't want to rotate the |
| // screen while engaging splitview (i.e. state_ == SCROLLING). |
| if (state_ == INACTIVE && !animate) { |
| - if (!wm::IsActiveWindow(left_window_)) |
| + aura::Window* active_window = window_list_provider_->GetWindowList().back(); |
| + if (active_window != left_window_) { |
| left_window_->Hide(); |
| - if (!wm::IsActiveWindow(right_window_)) |
| + right_window_->SetBounds(gfx::Rect(container_->bounds())); |
| + } |
| + if (active_window != right_window_) { |
| + left_window_->SetBounds(gfx::Rect(container_->bounds())); |
| right_window_->Hide(); |
| - SetWindowTransforms(gfx::Transform(), gfx::Transform(), false); |
| + } |
| + SetWindowTransforms( |
| + gfx::Transform(), gfx::Transform(), gfx::Transform(), false); |
| return; |
| } |
| left_window_->Show(); |
| right_window_->Show(); |
| + gfx::Transform divider_transform; |
| + divider_transform.Translate(divider_position_, 0); |
| if (state_ == ACTIVE) { |
| if (animate) { |
| - gfx::Transform left_transform = GetTargetTransformForBoundsAnimation( |
| - left_window_->bounds(), GetLeftTargetBounds()); |
| - gfx::Transform right_transform = GetTargetTransformForBoundsAnimation( |
| - right_window_->bounds(), GetRightTargetBounds()); |
| - SetWindowTransforms(left_transform, right_transform, true); |
| + gfx::Transform left_transform = |
| + GetTransformForBounds(left_window_->bounds(), GetLeftAreaBounds()); |
| + gfx::Transform right_transform = |
| + GetTransformForBounds(right_window_->bounds(), GetRightAreaBounds()); |
| + SetWindowTransforms( |
| + left_transform, right_transform, divider_transform, true); |
| } else { |
| - left_window_->SetBounds(GetLeftTargetBounds()); |
| - right_window_->SetBounds(GetRightTargetBounds()); |
| - SetWindowTransforms(gfx::Transform(), gfx::Transform(), false); |
| + left_window_->SetBounds(GetLeftAreaBounds()); |
| + right_window_->SetBounds(GetRightAreaBounds()); |
| + SetWindowTransforms( |
| + gfx::Transform(), gfx::Transform(), divider_transform, false); |
| } |
| } else { |
| gfx::Transform left_transform; |
| - left_transform.Translate(separator_position_ - container_->bounds().width(), |
| - 0); |
| gfx::Transform right_transform; |
| - right_transform.Translate(separator_position_, 0); |
| - SetWindowTransforms(left_transform, right_transform, animate); |
| + gfx::Rect left_area_bounds = GetLeftAreaBounds(); |
| + gfx::Rect right_area_bounds = GetRightAreaBounds(); |
| + // If the width of the window is greater than the width of the area which it |
| + // is supposed to occupy - translate the window. Otherwise scale the window |
| + // up to fill the target area. |
| + if (left_window_->bounds().width() >= left_area_bounds.width()) { |
| + left_transform.Translate( |
| + left_area_bounds.right() - left_window_->bounds().right(), 0); |
| + } else { |
| + left_transform = |
| + GetTransformForBounds(left_window_->bounds(), left_area_bounds); |
| + } |
| + if (right_window_->bounds().width() >= right_area_bounds.width()) { |
| + right_transform.Translate( |
| + right_area_bounds.x() - right_window_->bounds().x(), 0); |
| + } else { |
| + right_transform = |
| + GetTransformForBounds(right_window_->bounds(), right_area_bounds); |
| + } |
| + SetWindowTransforms( |
| + left_transform, right_transform, divider_transform, animate); |
| } |
| // Note: |left_window_| and |right_window_| may be NULL if calling |
| // SetWindowTransforms(): |
| @@ -204,6 +477,7 @@ void SplitViewController::UpdateLayout(bool animate) { |
| void SplitViewController::SetWindowTransforms( |
| const gfx::Transform& left_transform, |
| const gfx::Transform& right_transform, |
| + const gfx::Transform& divider_transform, |
| bool animate) { |
| if (animate) { |
| ui::ScopedLayerAnimationSettings left_settings( |
| @@ -212,6 +486,18 @@ void SplitViewController::SetWindowTransforms( |
| ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
| left_window_->SetTransform(left_transform); |
| + ui::ScopedLayerAnimationSettings divider_widget_settings( |
| + divider_widget_->GetNativeWindow()->layer()->GetAnimator()); |
| + divider_widget_settings.SetPreemptionStrategy( |
| + ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
| + divider_widget_->GetNativeWindow()->SetTransform(divider_transform); |
| + |
| + ui::ScopedLayerAnimationSettings divider_layer_settings( |
| + divider_window_->layer()->GetAnimator()); |
| + divider_layer_settings.SetPreemptionStrategy( |
| + ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
| + divider_window_->SetTransform(divider_transform); |
| + |
| ui::ScopedLayerAnimationSettings right_settings( |
| right_window_->layer()->GetAnimator()); |
| right_settings.SetPreemptionStrategy( |
| @@ -223,6 +509,8 @@ void SplitViewController::SetWindowTransforms( |
| } else { |
| left_window_->SetTransform(left_transform); |
| right_window_->SetTransform(right_transform); |
| + divider_widget_->GetNativeWindow()->SetTransform(divider_transform); |
| + divider_window_->SetTransform(divider_transform); |
| } |
| } |
| @@ -243,7 +531,7 @@ void SplitViewController::UpdateSeparatorPositionFromScrollDelta(float delta) { |
| const gfx::Rect& display_bounds = |
| screen->GetDisplayNearestWindow(container_).bounds(); |
| gfx::Rect container_bounds = container_->GetBoundsInScreen(); |
| - separator_position_ = |
| + divider_position_ = |
| delta > 0 ? ((int)delta) + display_bounds.x() - container_bounds.x() |
| : display_bounds.right() - container_bounds.x() + delta; |
| } |
| @@ -255,13 +543,13 @@ void SplitViewController::ScrollBegin(BezelController::Bezel bezel, |
| float delta) { |
| if (!CanScroll()) |
| return; |
| + |
| SetState(SCROLLING); |
| aura::Window::Windows windows = window_list_provider_->GetWindowList(); |
| CHECK(windows.size() >= 2); |
| aura::Window::Windows::const_reverse_iterator iter = windows.rbegin(); |
| aura::Window* current_window = *(iter); |
| - CHECK(wm::IsActiveWindow(current_window)); |
| if (delta > 0) { |
| right_window_ = current_window; |
| @@ -286,16 +574,16 @@ void SplitViewController::ScrollEnd() { |
| // we would go into the split view mode. |
| const int kMaxDistanceFromMiddle = 120; |
| int container_width = container_->GetBoundsInScreen().width(); |
| - if (std::abs(container_width / 2 - separator_position_) <= |
| + if (std::abs(container_width / 2 - divider_position_) <= |
| kMaxDistanceFromMiddle) { |
| + divider_position_ = container_width / 2; |
| SetState(ACTIVE); |
| - separator_position_ = container_width / 2; |
| - } else if (separator_position_ < container_width / 2) { |
| - separator_position_ = 0; |
| + } else if (divider_position_ < container_width / 2) { |
| + divider_position_ = 0; |
| SetState(INACTIVE); |
| wm::ActivateWindow(right_window_); |
| } else { |
| - separator_position_ = container_width; |
| + divider_position_ = container_width; |
| SetState(INACTIVE); |
| wm::ActivateWindow(left_window_); |
| } |
| @@ -318,4 +606,53 @@ bool SplitViewController::CanScroll() { |
| return result; |
| } |
| +/////////////////////////////////////////////////////////////////////////////// |
| +// ScrollHandle::ScrollDelegate: |
| + |
| +void SplitViewController::HandleScrollBegin(float delta) { |
| + CHECK(state_ == ACTIVE); |
| + state_ = SCROLLING; |
| + divider_position_ = delta + divider_position_; |
| + UpdateLayout(false); |
| +} |
| + |
| +void SplitViewController::HandleScrollEnd() { |
| + ScrollEnd(); |
| +} |
| + |
| +void SplitViewController::HandleScrollUpdate(float delta) { |
| + if (state_ != SCROLLING) |
| + return; |
| + divider_position_ = delta + container_->GetBoundsInScreen().width() / 2; |
| + UpdateLayout(false); |
| +} |
| + |
| +bool SplitViewController::HandleCanScroll() { |
| + CHECK(IsLandscapeOrientation(gfx::Screen::GetNativeScreen() |
| + ->GetDisplayNearestWindow(container_) |
| + .rotation())); |
| + return true; |
| +} |
| + |
| +/////////////////////////////////////////////////////////////////////////////// |
| +// WindowManagerObserver: |
| + |
| +void SplitViewController::OnOverviewModeEnter() { |
| + if (divider_widget_) { |
|
sadrul
2014/09/15 14:32:29
Remove {}
mfomitchev
2014/09/15 16:37:24
Done.
|
| + HideDivider(); |
| + } |
| +} |
| + |
| +void SplitViewController::OnOverviewModeExit() { |
| + if (state_ != INACTIVE) { |
|
sadrul
2014/09/15 14:32:29
ditto
mfomitchev
2014/09/15 16:37:24
Done.
|
| + ShowDivider(); |
| + } |
| +} |
| + |
| +void SplitViewController::OnSplitViewModeEnter() { |
| +} |
| + |
| +void SplitViewController::OnSplitViewModeExit() { |
| +} |
| + |
| } // namespace athena |