OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 29 matching lines...) Expand all Loading... | |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 PopupMenuChromium::PopupMenuChromium(LocalFrame& frame, PopupMenuClient* client) | 42 PopupMenuChromium::PopupMenuChromium(LocalFrame& frame, PopupMenuClient* client) |
43 : m_popupClient(client) | 43 : m_popupClient(client) |
44 , m_frameView(frame.view()) | 44 , m_frameView(frame.view()) |
45 { | 45 { |
46 } | 46 } |
47 | 47 |
48 PopupMenuChromium::~PopupMenuChromium() | 48 PopupMenuChromium::~PopupMenuChromium() |
49 { | 49 { |
50 #if !ENABLE(OILPAN) | |
50 // When the PopupMenuChromium is destroyed, the client could already have be en deleted. | 51 // When the PopupMenuChromium is destroyed, the client could already have be en deleted. |
51 if (m_popup) | 52 if (m_popup) |
52 m_popup->disconnectClient(); | 53 m_popup->disconnectClient(); |
53 hide(); | 54 hide(); |
haraken
2014/09/26 09:19:25
Help me understand: Where are disconnectClient and
sof
2014/09/28 17:03:52
Thanks, I didn't follow through on this dtor chang
| |
55 #endif | |
56 } | |
57 | |
58 void PopupMenuChromium::trace(Visitor* visitor) | |
59 { | |
60 visitor->trace(m_frameView); | |
61 visitor->trace(m_popup); | |
62 PopupMenu::trace(visitor); | |
54 } | 63 } |
55 | 64 |
56 void PopupMenuChromium::show(const FloatQuad& controlPosition, const IntSize& co ntrolSize, int index) | 65 void PopupMenuChromium::show(const FloatQuad& controlPosition, const IntSize& co ntrolSize, int index) |
57 { | 66 { |
58 if (!m_popup) { | 67 if (!m_popup) { |
59 bool deviceSupportsTouch = m_frameView->frame().settings()->deviceSuppor tsTouch(); | 68 bool deviceSupportsTouch = m_frameView->frame().settings()->deviceSuppor tsTouch(); |
60 m_popup = PopupContainer::create(m_popupClient, deviceSupportsTouch); | 69 m_popup = PopupContainer::create(m_popupClient, deviceSupportsTouch); |
61 } | 70 } |
62 m_popup->showInRect(controlPosition, controlSize, m_frameView.get(), index); | 71 m_popup->showInRect(controlPosition, controlSize, m_frameView.get(), index); |
63 } | 72 } |
64 | 73 |
65 void PopupMenuChromium::hide() | 74 void PopupMenuChromium::hide() |
66 { | 75 { |
67 if (m_popup) | 76 if (m_popup) |
68 m_popup->hide(); | 77 m_popup->hide(); |
69 } | 78 } |
70 | 79 |
71 void PopupMenuChromium::updateFromElement() | 80 void PopupMenuChromium::updateFromElement() |
72 { | 81 { |
73 m_popup->updateFromElement(); | 82 m_popup->updateFromElement(); |
74 } | 83 } |
75 | 84 |
76 | 85 |
77 void PopupMenuChromium::disconnectClient() | 86 void PopupMenuChromium::disconnectClient() |
78 { | 87 { |
79 m_popupClient = 0; | 88 m_popupClient = 0; |
80 } | 89 } |
81 | 90 |
82 } // namespace blink | 91 } // namespace blink |
OLD | NEW |