| 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 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_COLOR_PICKER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_COLOR_PICKER_H_ |
| 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_COLOR_PICKER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_COLOR_PICKER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "content/public/browser/render_widget_host.h" | 10 #include "content/public/browser/render_widget_host.h" |
| 11 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 class WebMouseEvent; | 14 class WebMouseEvent; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 class RenderWidgetHostImpl; | 19 class RenderWidgetHostImpl; |
| 20 | 20 |
| 21 namespace devtools { | 21 namespace protocol { |
| 22 namespace page { | |
| 23 | 22 |
| 24 class ColorPicker { | 23 class ColorPicker { |
| 25 public: | 24 public: |
| 26 typedef base::Callback<void(int, int, int, int)> ColorPickedCallback; | 25 typedef base::Callback<void(int, int, int, int)> ColorPickedCallback; |
| 27 | 26 |
| 28 explicit ColorPicker(ColorPickedCallback callback); | 27 explicit ColorPicker(ColorPickedCallback callback); |
| 29 virtual ~ColorPicker(); | 28 virtual ~ColorPicker(); |
| 30 | 29 |
| 31 void SetRenderWidgetHost(RenderWidgetHostImpl* host); | 30 void SetRenderWidgetHost(RenderWidgetHostImpl* host); |
| 32 void SetEnabled(bool enabled); | 31 void SetEnabled(bool enabled); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 44 SkBitmap frame_; | 43 SkBitmap frame_; |
| 45 int last_cursor_x_; | 44 int last_cursor_x_; |
| 46 int last_cursor_y_; | 45 int last_cursor_y_; |
| 47 RenderWidgetHost::MouseEventCallback mouse_event_callback_; | 46 RenderWidgetHost::MouseEventCallback mouse_event_callback_; |
| 48 RenderWidgetHostImpl* host_; | 47 RenderWidgetHostImpl* host_; |
| 49 base::WeakPtrFactory<ColorPicker> weak_factory_; | 48 base::WeakPtrFactory<ColorPicker> weak_factory_; |
| 50 | 49 |
| 51 DISALLOW_COPY_AND_ASSIGN(ColorPicker); | 50 DISALLOW_COPY_AND_ASSIGN(ColorPicker); |
| 52 }; | 51 }; |
| 53 | 52 |
| 54 } // namespace page | 53 } // namespace protocol |
| 55 } // namespace devtools | |
| 56 } // namespace content | 54 } // namespace content |
| 57 | 55 |
| 58 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_COLOR_PICKER_H_ | 56 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_COLOR_PICKER_H_ |
| OLD | NEW |