Chromium Code Reviews| 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "core/page/PagePopupController.h" | 32 #include "core/page/PagePopupController.h" |
| 33 | 33 |
| 34 #include "core/page/PagePopup.h" | |
| 34 #include "core/page/PagePopupClient.h" | 35 #include "core/page/PagePopupClient.h" |
| 35 #include "platform/text/PlatformLocale.h" | 36 #include "platform/text/PlatformLocale.h" |
| 36 #include "public/platform/Platform.h" | 37 #include "public/platform/Platform.h" |
| 37 | 38 |
| 38 namespace blink { | 39 namespace blink { |
| 39 | 40 |
| 40 PagePopupController::PagePopupController(PagePopupClient* client) | 41 PagePopupController::PagePopupController(PagePopup* popup, PagePopupClient* clie nt) |
| 41 : m_popupClient(client) | 42 : m_popup(popup) |
| 43 , m_popupClient(client) | |
| 42 { | 44 { |
| 45 ASSERT(popup); | |
|
tkent
2015/04/14 11:09:32
nit: So, the argument and m_popup should be |PageP
keishi
2015/04/14 11:17:45
Done.
| |
| 43 ASSERT(client); | 46 ASSERT(client); |
| 44 } | 47 } |
| 45 | 48 |
| 46 PassRefPtrWillBeRawPtr<PagePopupController> PagePopupController::create(PagePopu pClient* client) | 49 PassRefPtrWillBeRawPtr<PagePopupController> PagePopupController::create(PagePopu p* popup, PagePopupClient* client) |
| 47 { | 50 { |
| 48 return adoptRefWillBeNoop(new PagePopupController(client)); | 51 return adoptRefWillBeNoop(new PagePopupController(popup, client)); |
| 49 } | 52 } |
| 50 | 53 |
| 51 void PagePopupController::setValueAndClosePopup(int numValue, const String& stri ngValue) | 54 void PagePopupController::setValueAndClosePopup(int numValue, const String& stri ngValue) |
| 52 { | 55 { |
| 53 if (m_popupClient) | 56 if (m_popupClient) |
| 54 m_popupClient->setValueAndClosePopup(numValue, stringValue); | 57 m_popupClient->setValueAndClosePopup(numValue, stringValue); |
| 55 } | 58 } |
| 56 | 59 |
| 57 void PagePopupController::setValue(const String& value) | 60 void PagePopupController::setValue(const String& value) |
| 58 { | 61 { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 void PagePopupController::clearPagePopupClient() | 115 void PagePopupController::clearPagePopupClient() |
| 113 { | 116 { |
| 114 m_popupClient = nullptr; | 117 m_popupClient = nullptr; |
| 115 } | 118 } |
| 116 | 119 |
| 117 void PagePopupController::histogramEnumeration(const String& name, int sample, i nt boundaryValue) | 120 void PagePopupController::histogramEnumeration(const String& name, int sample, i nt boundaryValue) |
| 118 { | 121 { |
| 119 blink::Platform::current()->histogramEnumeration(name.utf8().data(), sample, boundaryValue); | 122 blink::Platform::current()->histogramEnumeration(name.utf8().data(), sample, boundaryValue); |
| 120 } | 123 } |
| 121 | 124 |
| 125 void PagePopupController::setWindowRect(int x, int y, int width, int height) | |
| 126 { | |
| 127 if (m_popup) | |
| 128 m_popup->setWindowRect(IntRect(x, y, width, height)); | |
| 122 } | 129 } |
| 130 | |
| 131 } | |
| OLD | NEW |