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

Side by Side Diff: ash/host/ash_window_tree_host_platform.cc

Issue 2524873002: Rename WindowTreeHost G|SetBounds to indicate they are in pixels. (Closed)
Patch Set: rebase Created 4 years 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
« no previous file with comments | « ash/host/ash_window_tree_host_platform.h ('k') | ash/host/ash_window_tree_host_unified.h » ('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 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 "ash/host/ash_window_tree_host_platform.h" 5 #include "ash/host/ash_window_tree_host_platform.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/host/root_window_transformer.h" 9 #include "ash/host/root_window_transformer.h"
10 #include "ash/host/transformer_helper.h" 10 #include "ash/host/transformer_helper.h"
(...skipping 26 matching lines...) Expand all
37 transformer_helper_.Init(); 37 transformer_helper_.Init();
38 } 38 }
39 39
40 AshWindowTreeHostPlatform::~AshWindowTreeHostPlatform() {} 40 AshWindowTreeHostPlatform::~AshWindowTreeHostPlatform() {}
41 41
42 void AshWindowTreeHostPlatform::ToggleFullScreen() { 42 void AshWindowTreeHostPlatform::ToggleFullScreen() {
43 NOTIMPLEMENTED(); 43 NOTIMPLEMENTED();
44 } 44 }
45 45
46 bool AshWindowTreeHostPlatform::ConfineCursorToRootWindow() { 46 bool AshWindowTreeHostPlatform::ConfineCursorToRootWindow() {
47 gfx::Rect confined_bounds(GetBounds().size()); 47 gfx::Rect confined_bounds(GetBoundsInPixels().size());
48 confined_bounds.Inset(transformer_helper_.GetHostInsets()); 48 confined_bounds.Inset(transformer_helper_.GetHostInsets());
49 platform_window()->ConfineCursorToBounds(confined_bounds); 49 platform_window()->ConfineCursorToBounds(confined_bounds);
50 return true; 50 return true;
51 } 51 }
52 52
53 void AshWindowTreeHostPlatform::UnConfineCursor() { 53 void AshWindowTreeHostPlatform::UnConfineCursor() {
54 NOTIMPLEMENTED(); 54 NOTIMPLEMENTED();
55 } 55 }
56 56
57 void AshWindowTreeHostPlatform::SetRootWindowTransformer( 57 void AshWindowTreeHostPlatform::SetRootWindowTransformer(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 void AshWindowTreeHostPlatform::UpdateRootWindowSize( 93 void AshWindowTreeHostPlatform::UpdateRootWindowSize(
94 const gfx::Size& host_size) { 94 const gfx::Size& host_size) {
95 transformer_helper_.UpdateWindowSize(host_size); 95 transformer_helper_.UpdateWindowSize(host_size);
96 } 96 }
97 97
98 void AshWindowTreeHostPlatform::OnCursorVisibilityChangedNative(bool show) { 98 void AshWindowTreeHostPlatform::OnCursorVisibilityChangedNative(bool show) {
99 SetTapToClickPaused(!show); 99 SetTapToClickPaused(!show);
100 } 100 }
101 101
102 void AshWindowTreeHostPlatform::SetBounds(const gfx::Rect& bounds) { 102 void AshWindowTreeHostPlatform::SetBoundsInPixels(const gfx::Rect& bounds) {
103 WindowTreeHostPlatform::SetBounds(bounds); 103 WindowTreeHostPlatform::SetBoundsInPixels(bounds);
104 ConfineCursorToRootWindow(); 104 ConfineCursorToRootWindow();
105 } 105 }
106 106
107 void AshWindowTreeHostPlatform::DispatchEvent(ui::Event* event) { 107 void AshWindowTreeHostPlatform::DispatchEvent(ui::Event* event) {
108 TRACE_EVENT0("input", "AshWindowTreeHostPlatform::DispatchEvent"); 108 TRACE_EVENT0("input", "AshWindowTreeHostPlatform::DispatchEvent");
109 if (event->IsLocatedEvent()) 109 if (event->IsLocatedEvent())
110 TranslateLocatedEvent(static_cast<ui::LocatedEvent*>(event)); 110 TranslateLocatedEvent(static_cast<ui::LocatedEvent*>(event));
111 SendEventToProcessor(event); 111 SendEventToProcessor(event);
112 } 112 }
113 113
(...skipping 11 matching lines...) Expand all
125 #if defined(USE_OZONE) 125 #if defined(USE_OZONE)
126 DCHECK(ui::OzonePlatform::GetInstance()->GetInputController()); 126 DCHECK(ui::OzonePlatform::GetInstance()->GetInputController());
127 127
128 // Temporarily pause tap-to-click when the cursor is hidden. 128 // Temporarily pause tap-to-click when the cursor is hidden.
129 ui::OzonePlatform::GetInstance()->GetInputController()->SetTapToClickPaused( 129 ui::OzonePlatform::GetInstance()->GetInputController()->SetTapToClickPaused(
130 state); 130 state);
131 #endif 131 #endif
132 } 132 }
133 133
134 } // namespace ash 134 } // namespace ash
OLDNEW
« no previous file with comments | « ash/host/ash_window_tree_host_platform.h ('k') | ash/host/ash_window_tree_host_unified.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698