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

Side by Side Diff: ui/viewer/viewer_host_win.cc

Issue 10872002: beginnings of metro viewer process (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 8 years, 3 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 | « ui/viewer/viewer_host_win.h ('k') | ui/viewer/viewer_ipc_server.h » ('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 "ui/viewer/viewer_host_win.h"
6
7 #include "ui/aura/client/stacking_client.h"
8 #include "ui/aura/display_manager.h"
9 #include "ui/aura/env.h"
10 #include "ui/aura/focus_manager.h"
11 #include "ui/aura/root_window.h"
12 #include "ui/aura/shared/root_window_capture_client.h"
13 #include "ui/aura/single_display_manager.h"
14
15 class ViewerStackingClient : public aura::client::StackingClient {
16 public:
17 explicit ViewerStackingClient(aura::RootWindow* root_window)
18 : root_window_(root_window) {
19 aura::client::SetStackingClient(this);
20 }
21
22 virtual ~ViewerStackingClient() {
23 aura::client::SetStackingClient(NULL);
24 }
25
26 // Overridden from aura::client::StackingClient:
27 virtual aura::Window* GetDefaultParent(aura::Window* window,
28 const gfx::Rect& bounds) OVERRIDE {
29 return root_window_;
30 }
31
32 private:
33 aura::RootWindow* root_window_;
34
35 scoped_ptr<aura::shared::RootWindowCaptureClient> capture_client_;
36
37 DISALLOW_COPY_AND_ASSIGN(ViewerStackingClient);
38 };
39
40 ViewerHostWin::ViewerHostWin() {
41 aura::DisplayManager::set_use_fullscreen_host_window(true);
42 aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager);
43 root_window_.reset(aura::DisplayManager::CreateRootWindowForPrimaryDisplay());
44 root_window_capture_client_.reset(
45 new aura::shared::RootWindowCaptureClient(root_window_.get()));
46 focus_manager_.reset(new aura::FocusManager);
47 root_window_->set_focus_manager(focus_manager_.get());
48 stacking_client_.reset(new ViewerStackingClient(root_window_.get()));
49 root_window_->ShowRootWindow();
50 }
51
52 ViewerHostWin::~ViewerHostWin() {
53 }
OLDNEW
« no previous file with comments | « ui/viewer/viewer_host_win.h ('k') | ui/viewer/viewer_ipc_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698