OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #ifndef ColorChooserUIController_h | 26 #ifndef ColorChooserUIController_h |
27 #define ColorChooserUIController_h | 27 #define ColorChooserUIController_h |
28 | 28 |
29 #include "platform/ColorChooser.h" | 29 #include "platform/ColorChooser.h" |
30 #include "platform/text/PlatformLocale.h" | 30 #include "platform/text/PlatformLocale.h" |
31 #include "public/web/WebColorChooserClient.h" | 31 #include "public/web/WebColorChooserClient.h" |
32 #include "wtf/OwnPtr.h" | 32 #include "wtf/OwnPtr.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
| 35 |
35 class ColorChooserClient; | 36 class ColorChooserClient; |
36 class LocalFrame; | 37 class LocalFrame; |
37 } | |
38 | |
39 namespace blink { | |
40 | |
41 class WebColorChooser; | 38 class WebColorChooser; |
42 | 39 |
43 class ColorChooserUIController : public WebColorChooserClient, public blink::Col
orChooser { | 40 class ColorChooserUIController : public WebColorChooserClient, public ColorChoos
er { |
44 public: | 41 public: |
45 ColorChooserUIController(blink::LocalFrame*, blink::ColorChooserClient*); | 42 ColorChooserUIController(LocalFrame*, ColorChooserClient*); |
46 virtual ~ColorChooserUIController(); | 43 virtual ~ColorChooserUIController(); |
47 | 44 |
48 virtual void openUI(); | 45 virtual void openUI(); |
49 | 46 |
50 // ColorChooser functions: | 47 // ColorChooser functions: |
51 virtual void setSelectedColor(const blink::Color&) OVERRIDE FINAL; | 48 virtual void setSelectedColor(const Color&) OVERRIDE FINAL; |
52 virtual void endChooser() OVERRIDE; | 49 virtual void endChooser() OVERRIDE; |
53 | 50 |
54 // WebColorChooserClient functions: | 51 // WebColorChooserClient functions: |
55 virtual void didChooseColor(const WebColor&) OVERRIDE FINAL; | 52 virtual void didChooseColor(const WebColor&) OVERRIDE FINAL; |
56 virtual void didEndChooser() OVERRIDE FINAL; | 53 virtual void didEndChooser() OVERRIDE FINAL; |
57 | 54 |
58 protected: | 55 protected: |
59 void openColorChooser(); | 56 void openColorChooser(); |
60 OwnPtr<WebColorChooser> m_chooser; | 57 OwnPtr<WebColorChooser> m_chooser; |
61 | 58 |
62 private: | 59 private: |
63 | 60 LocalFrame* m_frame; |
64 blink::LocalFrame* m_frame; | 61 ColorChooserClient* m_client; |
65 blink::ColorChooserClient* m_client; | |
66 }; | 62 }; |
67 | 63 |
68 } | 64 } |
69 | 65 |
70 #endif // ColorChooserUIController_h | 66 #endif // ColorChooserUIController_h |
OLD | NEW |