OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/public/renderer/render_view_observer.h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColorChooser.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColorChooserClient
.h" |
| 13 |
| 14 #if defined(ENABLE_INPUT_COLOR) |
| 15 |
| 16 class RenderViewImpl; |
| 17 |
| 18 class RendererWebColorChooserImpl : public WebKit::WebColorChooser, |
| 19 public content::RenderViewObserver { |
| 20 public: |
| 21 explicit RendererWebColorChooserImpl(RenderViewImpl* sender, |
| 22 WebKit::WebColorChooserClient*); |
| 23 virtual ~RendererWebColorChooserImpl(); |
| 24 |
| 25 virtual void setSelectedColor(const WebKit::WebColor); |
| 26 virtual void endChooser(); |
| 27 |
| 28 virtual WebKit::WebColorChooserClient* client(); |
| 29 |
| 30 private: |
| 31 // RenderView::Observer implementation. |
| 32 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 33 |
| 34 void OnDidChooseColorResponse(const WebKit::WebColor color); |
| 35 void OnDidDetachColorChooser(); |
| 36 |
| 37 scoped_ptr< WebKit::WebColorChooserClient> client_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(RendererWebColorChooserImpl); |
| 40 }; |
| 41 |
| 42 #endif // defined(ENABLE_INPUT_COLOR) |
| 43 |
| 44 #endif // CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_ |
OLD | NEW |