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

Side by Side Diff: ash/root_window_controller.h

Issue 2911393002: Nix GetRootWindowController, use RootWindowController::ForWindow. (Closed)
Patch Set: Sync and rebase AGAIN Created 3 years, 6 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
« no previous file with comments | « ash/mus/top_level_window_factory.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <vector> 10 #include <vector>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 namespace wm { 72 namespace wm {
73 class RootWindowLayoutManager; 73 class RootWindowLayoutManager;
74 } 74 }
75 75
76 // This class maintains the per root window state for ash. This class 76 // This class maintains the per root window state for ash. This class
77 // owns the root window and other dependent objects that should be 77 // owns the root window and other dependent objects that should be
78 // deleted upon the deletion of the root window. This object is 78 // deleted upon the deletion of the root window. This object is
79 // indirectly owned and deleted by |WindowTreeHostManager|. 79 // indirectly owned and deleted by |WindowTreeHostManager|.
80 // The RootWindowController for particular root window is stored in 80 // The RootWindowController for particular root window is stored in
81 // its property (RootWindowSettings) and can be obtained using 81 // its property (RootWindowSettings) and can be obtained using
82 // |GetRootWindowController(aura::WindowEventDispatcher*)| function. 82 // |RootWindowController::ForWindow(aura::Window*)| function.
83 class ASH_EXPORT RootWindowController : public ShellObserver { 83 class ASH_EXPORT RootWindowController : public ShellObserver {
84 public: 84 public:
85 // Enumerates the type of display. If there is only a single display then 85 // Enumerates the type of display. If there is only a single display then
86 // it is primary. In a multi-display environment one monitor is deemed the 86 // it is primary. In a multi-display environment one monitor is deemed the
87 // PRIMARY and all others SECONDARY. 87 // PRIMARY and all others SECONDARY.
88 enum class RootWindowType { PRIMARY, SECONDARY }; 88 enum class RootWindowType { PRIMARY, SECONDARY };
89 89
90 ~RootWindowController() override; 90 ~RootWindowController() override;
91 91
92 // Creates and Initialize the RootWindowController for primary display. 92 // Creates and Initialize the RootWindowController for primary display.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 // Handles double clicks on the panel window header. 352 // Handles double clicks on the panel window header.
353 std::unique_ptr<ui::EventHandler> panel_container_handler_; 353 std::unique_ptr<ui::EventHandler> panel_container_handler_;
354 354
355 std::unique_ptr<::wm::ScopedCaptureClient> capture_client_; 355 std::unique_ptr<::wm::ScopedCaptureClient> capture_client_;
356 356
357 static std::vector<RootWindowController*>* root_window_controllers_; 357 static std::vector<RootWindowController*>* root_window_controllers_;
358 358
359 DISALLOW_COPY_AND_ASSIGN(RootWindowController); 359 DISALLOW_COPY_AND_ASSIGN(RootWindowController);
360 }; 360 };
361 361
362 // On classic ash, returns the RootWindowController for the given |root_window|.
363 // On mus ash, returns the RootWindowController for the primary display.
364 // See RootWindowController class comment above.
365 ASH_EXPORT RootWindowController* GetRootWindowController(
366 const aura::Window* root_window);
367
368 } // namespace ash 362 } // namespace ash
369 363
370 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ 364 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/mus/top_level_window_factory.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698