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

Side by Side Diff: ash/touch/touch_observer_hud.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 years, 2 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/tooltips/tooltip_controller.cc ('k') | ash/ui_controls_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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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/touch/touch_observer_hud.h" 5 #include "ash/touch/touch_observer_hud.h"
6 6
7 #include "ash/shell_window_ids.h" 7 #include "ash/shell_window_ids.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "third_party/skia/include/core/SkPath.h" 10 #include "third_party/skia/include/core/SkPath.h"
(...skipping 24 matching lines...) Expand all
35 static_cast<int>(SK_ColorWHITE), 35 static_cast<int>(SK_ColorWHITE),
36 static_cast<int>(SK_ColorBLACK) 36 static_cast<int>(SK_ColorBLACK)
37 }; 37 };
38 38
39 class TouchHudCanvas : public views::View { 39 class TouchHudCanvas : public views::View {
40 public: 40 public:
41 explicit TouchHudCanvas(TouchObserverHUD* owner) 41 explicit TouchHudCanvas(TouchObserverHUD* owner)
42 : owner_(owner), 42 : owner_(owner),
43 path_index_(0), 43 path_index_(0),
44 color_index_(0) { 44 color_index_(0) {
45 gfx::Display display = gfx::Screen::GetPrimaryDisplay(); 45 gfx::Display display = Shell::GetScreen()->GetPrimaryDisplay();
46 gfx::Rect bounds = display.bounds(); 46 gfx::Rect bounds = display.bounds();
47 size_.set_width(bounds.width() / kScale); 47 size_.set_width(bounds.width() / kScale);
48 size_.set_height(bounds.height() / kScale); 48 size_.set_height(bounds.height() / kScale);
49 } 49 }
50 50
51 virtual ~TouchHudCanvas() {} 51 virtual ~TouchHudCanvas() {}
52 52
53 void Start(int id, const gfx::Point& point) { 53 void Start(int id, const gfx::Point& point) {
54 paths_[path_index_].reset(); 54 paths_[path_index_].reset();
55 paths_[path_index_].moveTo(SkIntToScalar(point.x() / kScale), 55 paths_[path_index_].moveTo(SkIntToScalar(point.x() / kScale),
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 return ui::ER_UNHANDLED; 219 return ui::ER_UNHANDLED;
220 } 220 }
221 221
222 void TouchObserverHUD::OnWidgetClosing(views::Widget* widget) { 222 void TouchObserverHUD::OnWidgetClosing(views::Widget* widget) {
223 DCHECK_EQ(widget, widget_); 223 DCHECK_EQ(widget, widget_);
224 widget_ = NULL; 224 widget_ = NULL;
225 } 225 }
226 226
227 } // namespace internal 227 } // namespace internal
228 } // namespace ash 228 } // namespace ash
OLDNEW
« no previous file with comments | « ash/tooltips/tooltip_controller.cc ('k') | ash/ui_controls_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698