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

Side by Side Diff: ui/views/mus/screen_mus.h

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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 | « ui/views/mus/platform_window_mus.cc ('k') | ui/views/mus/screen_mus.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 UI_VIEWS_MUS_SCREEN_MUS_H_ 5 #ifndef UI_VIEWS_MUS_SCREEN_MUS_H_
6 #define UI_VIEWS_MUS_SCREEN_MUS_H_ 6 #define UI_VIEWS_MUS_SCREEN_MUS_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
11 #include "components/mus/public/interfaces/display.mojom.h" 11 #include "components/mus/public/interfaces/display.mojom.h"
12 #include "mojo/public/cpp/bindings/binding.h" 12 #include "mojo/public/cpp/bindings/binding.h"
13 #include "ui/gfx/display.h" 13 #include "ui/gfx/display.h"
14 #include "ui/gfx/screen.h" 14 #include "ui/gfx/screen.h"
15 #include "ui/views/mus/mus_export.h" 15 #include "ui/views/mus/mus_export.h"
16 16
17 namespace mojo { 17 namespace mojo {
18 class ApplicationImpl; 18 class Shell;
19 } 19 }
20 20
21 namespace views { 21 namespace views {
22 22
23 class ScreenMusDelegate; 23 class ScreenMusDelegate;
24 24
25 // Screen implementation backed by mus::mojom::DisplayManager. 25 // Screen implementation backed by mus::mojom::DisplayManager.
26 class VIEWS_MUS_EXPORT ScreenMus 26 class VIEWS_MUS_EXPORT ScreenMus
27 : public gfx::Screen, 27 : public gfx::Screen,
28 public NON_EXPORTED_BASE(mus::mojom::DisplayManagerObserver) { 28 public NON_EXPORTED_BASE(mus::mojom::DisplayManagerObserver) {
29 public: 29 public:
30 explicit ScreenMus(ScreenMusDelegate* delegate); 30 explicit ScreenMus(ScreenMusDelegate* delegate);
31 ~ScreenMus() override; 31 ~ScreenMus() override;
32 32
33 void Init(mojo::ApplicationImpl* app); 33 void Init(mojo::Shell* shell);
34 34
35 private: 35 private:
36 int FindDisplayIndexById(int64_t id) const; 36 int FindDisplayIndexById(int64_t id) const;
37 37
38 // Invoked when a display changed in some weay, including being added. 38 // Invoked when a display changed in some weay, including being added.
39 // If |is_primary| is true, |changed_display| is the primary display. 39 // If |is_primary| is true, |changed_display| is the primary display.
40 void ProcessDisplayChanged(const gfx::Display& changed_display, 40 void ProcessDisplayChanged(const gfx::Display& changed_display,
41 bool is_primary); 41 bool is_primary);
42 42
43 // gfx::Screen: 43 // gfx::Screen:
(...skipping 21 matching lines...) Expand all
65 mojo::Binding<mus::mojom::DisplayManagerObserver> 65 mojo::Binding<mus::mojom::DisplayManagerObserver>
66 display_manager_observer_binding_; 66 display_manager_observer_binding_;
67 base::ObserverList<gfx::DisplayObserver> observers_; 67 base::ObserverList<gfx::DisplayObserver> observers_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(ScreenMus); 69 DISALLOW_COPY_AND_ASSIGN(ScreenMus);
70 }; 70 };
71 71
72 } // namespace views 72 } // namespace views
73 73
74 #endif // UI_VIEWS_MUS_SCREEN_MUS_H_ 74 #endif // UI_VIEWS_MUS_SCREEN_MUS_H_
OLDNEW
« no previous file with comments | « ui/views/mus/platform_window_mus.cc ('k') | ui/views/mus/screen_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698