OLD | NEW |
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/browser/devtools/protocol/color_picker.h" | 5 #include "content/browser/devtools/protocol/color_picker.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "content/browser/renderer_host/render_view_host_impl.h" | 8 #include "content/browser/renderer_host/render_view_host_impl.h" |
9 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 9 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
10 #include "content/common/cursors/webcursor.h" | 10 #include "content/common/cursors/webcursor.h" |
11 #include "third_party/WebKit/public/platform/WebCursorInfo.h" | 11 #include "third_party/WebKit/public/platform/WebCursorInfo.h" |
12 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | 12 #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
13 #include "third_party/WebKit/public/web/WebInputEvent.h" | 13 #include "third_party/WebKit/public/web/WebInputEvent.h" |
14 #include "third_party/skia/include/core/SkCanvas.h" | 14 #include "third_party/skia/include/core/SkCanvas.h" |
15 #include "ui/gfx/size_conversions.h" | 15 #include "ui/gfx/geometry/size_conversions.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 namespace devtools { | 18 namespace devtools { |
19 namespace page { | 19 namespace page { |
20 | 20 |
21 ColorPicker::ColorPicker(ColorPickedCallback callback) | 21 ColorPicker::ColorPicker(ColorPickedCallback callback) |
22 : callback_(callback), | 22 : callback_(callback), |
23 enabled_(false), | 23 enabled_(false), |
24 last_cursor_x_(-1), | 24 last_cursor_x_(-1), |
25 last_cursor_y_(-1), | 25 last_cursor_y_(-1), |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 #endif | 255 #endif |
256 | 256 |
257 cursor.InitFromCursorInfo(cursor_info); | 257 cursor.InitFromCursorInfo(cursor_info); |
258 DCHECK(host_); | 258 DCHECK(host_); |
259 host_->SetCursor(cursor); | 259 host_->SetCursor(cursor); |
260 } | 260 } |
261 | 261 |
262 } // namespace page | 262 } // namespace page |
263 } // namespace devtools | 263 } // namespace devtools |
264 } // namespace content | 264 } // namespace content |
OLD | NEW |