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

Side by Side Diff: headless/lib/browser/headless_window_tree_host.cc

Issue 2669693002: Minimize headless code that refers to aura. (Closed)
Patch Set: remove one window_tree_host reference Created 3 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
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 #include "headless/lib/browser/headless_window_tree_host.h" 5 #include "headless/lib/browser/headless_window_tree_host.h"
6 #include "ui/aura/window.h"
6 7
7 #include "ui/gfx/icc_profile.h" 8 #include "ui/gfx/icc_profile.h"
8 9
9 namespace headless { 10 namespace headless {
10 11
11 HeadlessWindowTreeHost::HeadlessWindowTreeHost(const gfx::Rect& bounds) 12 HeadlessWindowTreeHost::HeadlessWindowTreeHost(const gfx::Rect& bounds)
12 : bounds_(bounds) { 13 : bounds_(bounds) {
13 CreateCompositor(); 14 CreateCompositor();
14 OnAcceleratedWidgetAvailable(); 15 OnAcceleratedWidgetAvailable();
15 } 16 }
16 17
17 HeadlessWindowTreeHost::~HeadlessWindowTreeHost() { 18 HeadlessWindowTreeHost::~HeadlessWindowTreeHost() {
19 window_parenting_client_.reset();
18 DestroyCompositor(); 20 DestroyCompositor();
19 DestroyDispatcher(); 21 DestroyDispatcher();
20 } 22 }
21 23
24 void HeadlessWindowTreeHost::SetParentWindow(gfx::NativeWindow window) {
25 window_parenting_client_.reset(new HeadlessWindowParentingClient(window));
26 }
27
28 gfx::NativeWindow HeadlessWindowTreeHost::GetTopWindowContainingPoint(
29 const gfx::Point& point) {
30 return this->window()->GetTopWindowContainingPoint(point);
31 }
32
22 bool HeadlessWindowTreeHost::CanDispatchEvent(const ui::PlatformEvent& event) { 33 bool HeadlessWindowTreeHost::CanDispatchEvent(const ui::PlatformEvent& event) {
23 return false; 34 return false;
24 } 35 }
25 36
26 uint32_t HeadlessWindowTreeHost::DispatchEvent(const ui::PlatformEvent& event) { 37 uint32_t HeadlessWindowTreeHost::DispatchEvent(const ui::PlatformEvent& event) {
27 return 0; 38 return 0;
28 } 39 }
29 40
30 ui::EventSource* HeadlessWindowTreeHost::GetEventSource() { 41 ui::EventSource* HeadlessWindowTreeHost::GetEventSource() {
31 return this; 42 return this;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void HeadlessWindowTreeHost::MoveCursorToScreenLocationInPixels( 77 void HeadlessWindowTreeHost::MoveCursorToScreenLocationInPixels(
67 const gfx::Point& location) {} 78 const gfx::Point& location) {}
68 79
69 void HeadlessWindowTreeHost::OnCursorVisibilityChangedNative(bool show) {} 80 void HeadlessWindowTreeHost::OnCursorVisibilityChangedNative(bool show) {}
70 81
71 gfx::ICCProfile HeadlessWindowTreeHost::GetICCProfileForCurrentDisplay() { 82 gfx::ICCProfile HeadlessWindowTreeHost::GetICCProfileForCurrentDisplay() {
72 return gfx::ICCProfile(); 83 return gfx::ICCProfile();
73 } 84 }
74 85
75 } // namespace headless 86 } // namespace headless
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698