Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Commit

Permalink
impl: Track upstream changes in views subsystem
Browse files Browse the repository at this point in the history
Namely, changes that happened here:

  commit 37533821562c1f1c48c5c89f6161175b4e6ad569
  Author: oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
  Date:   Thu Sep 5 22:14:52 2013 +0000

      Remove old activation code and disable-focus-controller flags

      BUG=285339,285364

      Review URL: https://chromiumcodereview.appspot.com/23874013
  • Loading branch information
tiagovignatti committed Sep 6, 2013
1 parent 6ba2628 commit 221f446
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
25 changes: 8 additions & 17 deletions impl/desktop_root_window_host_wayland.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "ui/views/corewm/corewm_switches.h"
#include "ui/views/corewm/cursor_manager.h"
#include "ui/views/corewm/focus_controller.h"
#include "ui/views/widget/desktop_aura/desktop_activation_client.h"
#include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h"
#include "ui/views/widget/desktop_aura/desktop_focus_rules.h"
#include "ui/views/widget/desktop_aura/desktop_layout_manager.h"
Expand Down Expand Up @@ -52,10 +51,8 @@ DesktopRootWindowHostWayland::DesktopRootWindowHostWayland(

DesktopRootWindowHostWayland::~DesktopRootWindowHostWayland() {
root_window_->ClearProperty(kHostForRootWindow);
if (corewm::UseFocusControllerOnDesktop()) {
aura::client::SetFocusClient(root_window_, NULL);
aura::client::SetActivationClient(root_window_, NULL);
}
aura::client::SetFocusClient(root_window_, NULL);
aura::client::SetActivationClient(root_window_, NULL);
}

// static
Expand Down Expand Up @@ -121,18 +118,12 @@ aura::RootWindow* DesktopRootWindowHostWayland::InitRootWindow(

base::MessagePumpOzone::Current()->AddDispatcherForRootWindow(this);

if (corewm::UseFocusControllerOnDesktop()) {
corewm::FocusController* focus_controller =
new corewm::FocusController(new DesktopFocusRules);
focus_client_.reset(focus_controller);
aura::client::SetFocusClient(root_window_, focus_controller);
aura::client::SetActivationClient(root_window_, focus_controller);
root_window_->AddPreTargetHandler(focus_controller);
} else {
focus_client_.reset(new aura::FocusManager);
aura::client::SetFocusClient(root_window_, focus_client_.get());
activation_client_.reset(new DesktopActivationClient(root_window_));
}
corewm::FocusController* focus_controller =
new corewm::FocusController(new DesktopFocusRules);
focus_client_.reset(focus_controller);
aura::client::SetFocusClient(root_window_, focus_controller);
aura::client::SetActivationClient(root_window_, focus_controller);
root_window_->AddPreTargetHandler(focus_controller);

dispatcher_client_.reset(new DesktopDispatcherClient);
aura::client::SetDispatcherClient(root_window_,
Expand Down
2 changes: 0 additions & 2 deletions impl/desktop_root_window_host_wayland.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class ScreenPositionClient;
}

namespace views {
class DesktopActivationClient;
class DesktopDragDropClientAuraOzone;
class DesktopDispatcherClient;
class OzoneDesktopWindowMoveClient;
Expand Down Expand Up @@ -164,7 +163,6 @@ class VIEWS_EXPORT DesktopRootWindowHostWayland :

// aura:: objects that we own.
scoped_ptr<aura::client::FocusClient> focus_client_;
scoped_ptr<DesktopActivationClient> activation_client_;
scoped_ptr<views::corewm::CursorManager> cursor_client_;
scoped_ptr<DesktopDispatcherClient> dispatcher_client_;
scoped_ptr<aura::client::ScreenPositionClient> position_client_;
Expand Down

0 comments on commit 221f446

Please sign in to comment.