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

Side by Side Diff: ash/monitor/secondary_monitor_view.cc

Issue 9701098: MultiMonitor support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fix Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ash/monitor/secondary_monitor_view.h ('k') | ash/screen_ash.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ash/monitor/secondary_monitor_view.h"
6
7 #include "third_party/skia/include/core/SkColor.h"
8 #include "ui/aura/window.h"
9 #include "ui/views/view.h"
10 #include "ui/views/background.h"
11 #include "ui/views/widget/widget_delegate.h"
12 #include "ui/views/widget/widget.h"
13
14 namespace ash {
15 namespace {
16
17 const SkColor kBackground = SkColorSetRGB(0x33, 0x33, 0x33);
18
19 // A view to be displayed on secondary monitor.
20 class SecondaryMonitorView : public views::WidgetDelegateView {
21 public:
22 SecondaryMonitorView() {
23 set_background(views::Background::CreateSolidBackground(kBackground));
24 }
25 ~SecondaryMonitorView() {
26 }
27 };
28
29 } // namespace
30
31 views::Widget* CreateSecondaryMonitorWidget(aura::Window* parent) {
32 views::Widget* desktop_widget = new views::Widget;
33 views::Widget::InitParams params(
34 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
35 SecondaryMonitorView* view = new SecondaryMonitorView();
36 params.delegate = view;
37 params.parent = parent;
38 desktop_widget->Init(params);
39 desktop_widget->SetContentsView(view);
40 desktop_widget->Show();
41 desktop_widget->GetNativeView()->SetName("SecondaryMonitor");
42 return desktop_widget;
43 }
44
45 } // namespace ash
OLDNEW
« no previous file with comments | « ash/monitor/secondary_monitor_view.h ('k') | ash/screen_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698