diff options
author | horo@chromium.org <horo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-09 07:24:51 +0000 |
---|---|---|
committer | horo@chromium.org <horo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-09 07:24:51 +0000 |
commit | 6eba8c43ea2698284690ec96e0708228548b2be5 (patch) | |
tree | 3ce534c20eff0e2306784e48845a484dfd92fed3 /mojo/examples/window_manager | |
parent | d56a1d82f4113e12795a08cea2d0a086ba63f63f (diff) | |
download | chromium_src-6eba8c43ea2698284690ec96e0708228548b2be5.zip chromium_src-6eba8c43ea2698284690ec96e0708228548b2be5.tar.gz chromium_src-6eba8c43ea2698284690ec96e0708228548b2be5.tar.bz2 |
Revert of Connect X11 ConfigureNotify events to Mojo (https://codereview.chromium.org/354933002/)
Reason for revert:
http://build.chromium.org/p/chromium.win/builders/Win%207%20Tests%20x64%20%283%29/builds/14776/steps/mojo_view_manager_unittests/logs/SetNodeBounds
[ FAILED ] ViewManagerTest.SetNodeBounds (109 ms)
Original issue's description:
> Connect X11 ConfigureNotify events to Mojo
>
> This change plumbs top level window resize notifications from X11 through to the WindowManager and to the GLSurface associated with the top level window. It's an incremental step towards adding support for window manager level layout management (see crbug.com/389785).
>
> There's preliminary X11 Support for --start-fullscreen (don't try this) and --start-maximized command line arguments as well. This part of the patch could be broken out.
>
>
> BUG=388524
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281955
TBR=ben@chromium.org,sky@chromium.org,jamesr@chromium.org,hansmuller@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=388524
Review URL: https://codereview.chromium.org/378243002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281981 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/examples/window_manager')
-rw-r--r-- | mojo/examples/window_manager/window_manager.cc | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/mojo/examples/window_manager/window_manager.cc b/mojo/examples/window_manager/window_manager.cc index 5f1e843..2d3c694 100644 --- a/mojo/examples/window_manager/window_manager.cc +++ b/mojo/examples/window_manager/window_manager.cc @@ -13,7 +13,6 @@ #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" #include "mojo/services/public/cpp/input_events/input_events_type_converters.h" #include "mojo/services/public/cpp/view_manager/node.h" -#include "mojo/services/public/cpp/view_manager/node_observer.h" #include "mojo/services/public/cpp/view_manager/view.h" #include "mojo/services/public/cpp/view_manager/view_event_dispatcher.h" #include "mojo/services/public/cpp/view_manager/view_manager.h" @@ -157,36 +156,6 @@ class KeyboardManager : public KeyboardClient { DISALLOW_COPY_AND_ASSIGN(KeyboardManager); }; -class RootLayoutManager : public NodeObserver { - public: - explicit RootLayoutManager(ViewManager* view_manager, - Node* root, - Id content_node_id) - : root_(root), - view_manager_(view_manager), - content_node_id_(content_node_id) {} - virtual ~RootLayoutManager() {} - - private: - // Overridden from NodeObserver: - virtual void OnNodeBoundsChanged(Node* node, - const gfx::Rect& /*old_bounds*/, - const gfx::Rect& new_bounds) OVERRIDE { - DCHECK_EQ(node, root_); - Node* content_node = view_manager_->GetNodeById(content_node_id_); - content_node->SetBounds(new_bounds); - // Force the view's bitmap to be recreated - content_node->active_view()->SetColor(SK_ColorBLUE); - // TODO(hansmuller): Do Layout - } - - Node* root_; - ViewManager* view_manager_; - Id content_node_id_; - - DISALLOW_COPY_AND_ASSIGN(RootLayoutManager); -}; - class WindowManager : public ApplicationDelegate, public DebugPanel::Delegate, public ViewObserver, @@ -281,14 +250,10 @@ class WindowManager : public ApplicationDelegate, view_manager_->SetEventDispatcher(this); Node* node = Node::Create(view_manager); - root->AddChild(node); - node->SetBounds(gfx::Rect(root->bounds().size())); + view_manager->GetRoots().front()->AddChild(node); + node->SetBounds(gfx::Rect(800, 600)); content_node_id_ = node->id(); - root_layout_manager_.reset( - new RootLayoutManager(view_manager, root, content_node_id_)); - root->AddObserver(root_layout_manager_.get()); - View* view = View::Create(view_manager); node->SetActiveView(view); view->SetColor(SK_ColorBLUE); @@ -430,7 +395,6 @@ class WindowManager : public ApplicationDelegate, Node* launcher_ui_; std::vector<Node*> windows_; ViewManager* view_manager_; - scoped_ptr<RootLayoutManager> root_layout_manager_; // Id of the node most content is added to. The keyboard is NOT added here. Id content_node_id_; |