OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 16 matching lines...) Expand all Loading... |
27 #include "web/ColorChooserUIController.h" | 27 #include "web/ColorChooserUIController.h" |
28 | 28 |
29 #include "platform/ColorChooserClient.h" | 29 #include "platform/ColorChooserClient.h" |
30 #include "platform/graphics/Color.h" | 30 #include "platform/graphics/Color.h" |
31 #include "public/platform/WebColor.h" | 31 #include "public/platform/WebColor.h" |
32 #include "public/web/WebColorChooser.h" | 32 #include "public/web/WebColorChooser.h" |
33 #include "public/web/WebColorSuggestion.h" | 33 #include "public/web/WebColorSuggestion.h" |
34 #include "public/web/WebFrameClient.h" | 34 #include "public/web/WebFrameClient.h" |
35 #include "web/WebLocalFrameImpl.h" | 35 #include "web/WebLocalFrameImpl.h" |
36 | 36 |
37 using namespace blink; | |
38 | |
39 namespace blink { | 37 namespace blink { |
40 | 38 |
41 | 39 |
42 ColorChooserUIController::ColorChooserUIController(LocalFrame* frame, ColorChoos
erClient* client) | 40 ColorChooserUIController::ColorChooserUIController(LocalFrame* frame, ColorChoos
erClient* client) |
43 : m_frame(frame) | 41 : m_frame(frame) |
44 , m_client(client) | 42 , m_client(client) |
45 { | 43 { |
46 } | 44 } |
47 | 45 |
48 ColorChooserUIController::~ColorChooserUIController() | 46 ColorChooserUIController::~ColorChooserUIController() |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 ASSERT(!m_chooser); | 82 ASSERT(!m_chooser); |
85 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(m_frame); | 83 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(m_frame); |
86 WebFrameClient* webFrameClient = frame->client(); | 84 WebFrameClient* webFrameClient = frame->client(); |
87 if (!webFrameClient) | 85 if (!webFrameClient) |
88 return; | 86 return; |
89 m_chooser = adoptPtr(webFrameClient->createColorChooser( | 87 m_chooser = adoptPtr(webFrameClient->createColorChooser( |
90 this, static_cast<WebColor>(m_client->currentColor().rgb()), m_client->s
uggestions())); | 88 this, static_cast<WebColor>(m_client->currentColor().rgb()), m_client->s
uggestions())); |
91 } | 89 } |
92 | 90 |
93 } // namespace blink | 91 } // namespace blink |
OLD | NEW |