| 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 | 39 |
| 40 ColorChooserUIController::ColorChooserUIController(LocalFrame* frame, ColorChoos
erClient* client) | 40 ColorChooserUIController::ColorChooserUIController(LocalFrame* frame, ColorChoos
erClient* client) |
| 41 : m_frame(frame) | 41 : m_frame(frame) |
| 42 , m_client(client) | 42 , m_client(client) |
| 43 { | 43 { |
| 44 } | 44 } |
| 45 | 45 |
| 46 ColorChooserUIController::~ColorChooserUIController() | 46 ColorChooserUIController::~ColorChooserUIController() |
| 47 { | 47 { |
| 48 endChooser(); |
| 49 } |
| 50 |
| 51 void ColorChooserUIController::trace(Visitor* visitor) |
| 52 { |
| 53 visitor->trace(m_frame); |
| 54 visitor->trace(m_client); |
| 55 ColorChooser::trace(visitor); |
| 48 } | 56 } |
| 49 | 57 |
| 50 void ColorChooserUIController::openUI() | 58 void ColorChooserUIController::openUI() |
| 51 { | 59 { |
| 52 openColorChooser(); | 60 openColorChooser(); |
| 53 } | 61 } |
| 54 | 62 |
| 55 void ColorChooserUIController::setSelectedColor(const Color& color) | 63 void ColorChooserUIController::setSelectedColor(const Color& color) |
| 56 { | 64 { |
| 57 ASSERT(m_chooser); | 65 ASSERT(m_chooser); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 87 ASSERT(!m_chooser); | 95 ASSERT(!m_chooser); |
| 88 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(m_frame); | 96 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(m_frame); |
| 89 WebFrameClient* webFrameClient = frame->client(); | 97 WebFrameClient* webFrameClient = frame->client(); |
| 90 if (!webFrameClient) | 98 if (!webFrameClient) |
| 91 return; | 99 return; |
| 92 m_chooser = adoptPtr(webFrameClient->createColorChooser( | 100 m_chooser = adoptPtr(webFrameClient->createColorChooser( |
| 93 this, static_cast<WebColor>(m_client->currentColor().rgb()), m_client->s
uggestions())); | 101 this, static_cast<WebColor>(m_client->currentColor().rgb()), m_client->s
uggestions())); |
| 94 } | 102 } |
| 95 | 103 |
| 96 } // namespace blink | 104 } // namespace blink |
| OLD | NEW |