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

Side by Side Diff: ash/desktop_background/desktop_background_widget_controller.h

Issue 10810039: 2nd display should show the same background as login/lock screen: (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Post-review fix #2 Created 8 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_COMPONENT_H_
Nikita (slow) 2012/07/28 01:32:17 Please rename according to the new file name.
Denis Kuznetsov (DE-MUC) 2012/07/30 15:40:02 Done.
6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_COMPONENT_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/aura/window_property.h"
10 #include "ui/compositor/layer.h"
11 #include "ui/views/widget/widget.h"
12
13 namespace ash {
14 namespace internal {
15
16 // This class hides difference between two possible background implementations:
17 // effective Layer-based for solid color, and Widget-based for images.
18 class DesktopBackgroundWidgetController {
19 public:
20 // Create
21 explicit DesktopBackgroundWidgetController(views::Widget* widget);
22 explicit DesktopBackgroundWidgetController(ui::Layer* layer);
23
24 ~DesktopBackgroundWidgetController();
25
26 // Set bounds for component.
Nikita (slow) 2012/07/28 01:32:17 nit: Usage of word "component" is not clear in thi
Denis Kuznetsov (DE-MUC) 2012/07/30 15:40:02 Done.
27 void SetBounds(gfx::Rect bounds);
28
29 // Move component from |src_container| in |root_window| to |dest_container|.
30 // It is required for lock screen, when we need to move background so that
31 // it hides user's windows.
32 void Reparent(aura::RootWindow* root_window,
33 int src_container,
34 int dest_container);
35
36 views::Widget* widget() { return widget_; }
37 ui::Layer* layer() { return layer_.get(); }
38
39 private:
40 views::Widget* widget_;
41 scoped_ptr<ui::Layer> layer_;
42 };
43
44 // Window property key, that binds instance of DesktopBackgroundWidgetController
45 // to root windows.
46 extern const aura::WindowProperty<DesktopBackgroundWidgetController*>* const
47 kWindowDesktopComponent;
48
49 } // namespace internal
50 } // namespace ash
51
52 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_COMPONENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698