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

Side by Side Diff: content/shell/browser/shell_platform_data_aura.cc

Issue 273073002: Changes code using Compositor to pass in ContextFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tooltip on chromeos Created 6 years, 7 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 | « content/public/test/test_renderer_host.cc ('k') | content/shell/browser/shell_views.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "content/shell/browser/shell_platform_data_aura.h" 5 #include "content/shell/browser/shell_platform_data_aura.h"
6 6
7 #include "content/public/browser/context_factory.h"
7 #include "content/shell/browser/shell.h" 8 #include "content/shell/browser/shell.h"
8 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
9 #include "ui/aura/client/default_capture_client.h" 10 #include "ui/aura/client/default_capture_client.h"
10 #include "ui/aura/env.h" 11 #include "ui/aura/env.h"
11 #include "ui/aura/layout_manager.h" 12 #include "ui/aura/layout_manager.h"
12 #include "ui/aura/test/test_focus_client.h" 13 #include "ui/aura/test/test_focus_client.h"
13 #include "ui/aura/test/test_window_tree_client.h" 14 #include "ui/aura/test/test_window_tree_client.h"
14 #include "ui/aura/window.h" 15 #include "ui/aura/window.h"
15 #include "ui/aura/window_event_dispatcher.h" 16 #include "ui/aura/window_event_dispatcher.h"
16 #include "ui/base/ime/input_method.h" 17 #include "ui/base/ime/input_method.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 108
108 DISALLOW_COPY_AND_ASSIGN(MinimalInputEventFilter); 109 DISALLOW_COPY_AND_ASSIGN(MinimalInputEventFilter);
109 }; 110 };
110 111
111 } 112 }
112 113
113 ShellPlatformDataAura* Shell::platform_ = NULL; 114 ShellPlatformDataAura* Shell::platform_ = NULL;
114 115
115 ShellPlatformDataAura::ShellPlatformDataAura(const gfx::Size& initial_size) { 116 ShellPlatformDataAura::ShellPlatformDataAura(const gfx::Size& initial_size) {
116 CHECK(aura::Env::GetInstance()); 117 CHECK(aura::Env::GetInstance());
117 host_.reset(aura::WindowTreeHost::Create(gfx::Rect(initial_size))); 118 host_.reset(aura::WindowTreeHost::Create(gfx::Rect(initial_size),
119 GetContextFactory()));
118 host_->InitHost(); 120 host_->InitHost();
119 host_->window()->SetLayoutManager(new FillLayout(host_->window())); 121 host_->window()->SetLayoutManager(new FillLayout(host_->window()));
120 122
121 focus_client_.reset(new aura::test::TestFocusClient()); 123 focus_client_.reset(new aura::test::TestFocusClient());
122 aura::client::SetFocusClient(host_->window(), focus_client_.get()); 124 aura::client::SetFocusClient(host_->window(), focus_client_.get());
123 125
124 new wm::DefaultActivationClient(host_->window()); 126 new wm::DefaultActivationClient(host_->window());
125 capture_client_.reset( 127 capture_client_.reset(
126 new aura::client::DefaultCaptureClient(host_->window())); 128 new aura::client::DefaultCaptureClient(host_->window()));
127 window_tree_client_.reset( 129 window_tree_client_.reset(
128 new aura::test::TestWindowTreeClient(host_->window())); 130 new aura::test::TestWindowTreeClient(host_->window()));
129 ime_filter_.reset(new MinimalInputEventFilter(host_.get())); 131 ime_filter_.reset(new MinimalInputEventFilter(host_.get()));
130 } 132 }
131 133
132 ShellPlatformDataAura::~ShellPlatformDataAura() { 134 ShellPlatformDataAura::~ShellPlatformDataAura() {
133 } 135 }
134 136
135 void ShellPlatformDataAura::ShowWindow() { 137 void ShellPlatformDataAura::ShowWindow() {
136 host_->Show(); 138 host_->Show();
137 } 139 }
138 140
139 void ShellPlatformDataAura::ResizeWindow(const gfx::Size& size) { 141 void ShellPlatformDataAura::ResizeWindow(const gfx::Size& size) {
140 host_->SetBounds(gfx::Rect(size)); 142 host_->SetBounds(gfx::Rect(size));
141 } 143 }
142 144
143 } // namespace content 145 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_renderer_host.cc ('k') | content/shell/browser/shell_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698