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

Side by Side Diff: ash/root_window_controller.h

Issue 2633293005: Converts mash to use Shell (Closed)
Patch Set: cleanup Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef ASH_ROOT_WINDOW_CONTROLLER_H_ 5 #ifndef ASH_ROOT_WINDOW_CONTROLLER_H_
6 #define ASH_ROOT_WINDOW_CONTROLLER_H_ 6 #define ASH_ROOT_WINDOW_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 // Creates and Initialize the RootWindowController for secondary displays. 95 // Creates and Initialize the RootWindowController for secondary displays.
96 static void CreateForSecondaryDisplay(AshWindowTreeHost* host); 96 static void CreateForSecondaryDisplay(AshWindowTreeHost* host);
97 97
98 // Returns a RootWindowController of the window's root window. 98 // Returns a RootWindowController of the window's root window.
99 static RootWindowController* ForWindow(const aura::Window* window); 99 static RootWindowController* ForWindow(const aura::Window* window);
100 100
101 // Returns the RootWindowController of the target root window. 101 // Returns the RootWindowController of the target root window.
102 static RootWindowController* ForTargetRootWindow(); 102 static RootWindowController* ForTargetRootWindow();
103 103
104 static std::vector<RootWindowController*> root_window_controllers() {
105 return root_window_controllers_ ? *root_window_controllers_
106 : std::vector<RootWindowController*>();
James Cook 2017/01/18 01:00:24 nit: #include <vector>
sky 2017/01/18 04:00:07 Done.
107 }
108
104 // Configures |init_params| prior to initializing |widget|. 109 // Configures |init_params| prior to initializing |widget|.
105 // |shell_container_id| is the id of the container to parent |widget| to. 110 // |shell_container_id| is the id of the container to parent |widget| to.
106 // TODO(sky): remove this, http://crbug.com/671246. 111 // TODO(sky): remove this, http://crbug.com/671246.
107 void ConfigureWidgetInitParamsForContainer( 112 void ConfigureWidgetInitParamsForContainer(
108 views::Widget* widget, 113 views::Widget* widget,
109 int shell_container_id, 114 int shell_container_id,
110 views::Widget::InitParams* init_params); 115 views::Widget::InitParams* init_params);
111 116
112 // TODO(sky): move these to a separate class or use AshWindowTreeHost in 117 // TODO(sky): move these to a separate class or use AshWindowTreeHost in
113 // mash. http://crbug.com/671246. 118 // mash. http://crbug.com/671246.
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // Heads-up displays for touch events. These HUDs are not owned by the root 369 // Heads-up displays for touch events. These HUDs are not owned by the root
365 // window controller and manage their own lifetimes. 370 // window controller and manage their own lifetimes.
366 TouchHudDebug* touch_hud_debug_ = nullptr; 371 TouchHudDebug* touch_hud_debug_ = nullptr;
367 TouchHudProjection* touch_hud_projection_ = nullptr; 372 TouchHudProjection* touch_hud_projection_ = nullptr;
368 373
369 // Handles double clicks on the panel window header. 374 // Handles double clicks on the panel window header.
370 std::unique_ptr<ui::EventHandler> panel_container_handler_; 375 std::unique_ptr<ui::EventHandler> panel_container_handler_;
371 376
372 std::unique_ptr<::wm::ScopedCaptureClient> capture_client_; 377 std::unique_ptr<::wm::ScopedCaptureClient> capture_client_;
373 378
379 static std::vector<RootWindowController*>* root_window_controllers_;
380
374 DISALLOW_COPY_AND_ASSIGN(RootWindowController); 381 DISALLOW_COPY_AND_ASSIGN(RootWindowController);
375 }; 382 };
376 383
377 // On classic ash, returns the RootWindowController for the given |root_window|. 384 // On classic ash, returns the RootWindowController for the given |root_window|.
378 // On mus ash, returns the RootWindowController for the primary display. 385 // On mus ash, returns the RootWindowController for the primary display.
379 // See RootWindowController class comment above. 386 // See RootWindowController class comment above.
380 ASH_EXPORT RootWindowController* GetRootWindowController( 387 ASH_EXPORT RootWindowController* GetRootWindowController(
381 const aura::Window* root_window); 388 const aura::Window* root_window);
382 389
383 } // namespace ash 390 } // namespace ash
384 391
385 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ 392 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698