Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Side by Side Diff: Source/web/PopupMenuChromium.cpp

Issue 562513004: Remove FramelessScrollView. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix Windows build. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/PopupListBox.cpp ('k') | Source/web/WebPopupMenuImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // When the PopupMenuChromium is destroyed, the client could already have be en deleted. 50 // When the PopupMenuChromium is destroyed, the client could already have be en deleted.
51 if (m_popup) 51 if (m_popup)
52 m_popup->listBox()->disconnectClient(); 52 m_popup->disconnectClient();
53 hide(); 53 hide();
54 } 54 }
55 55
56 void PopupMenuChromium::show(const FloatQuad& controlPosition, const IntSize& co ntrolSize, int index) 56 void PopupMenuChromium::show(const FloatQuad& controlPosition, const IntSize& co ntrolSize, int index)
57 { 57 {
58 if (!m_popup) { 58 if (!m_popup) {
59 bool deviceSupportsTouch = m_frameView->frame().settings()->deviceSuppor tsTouch(); 59 bool deviceSupportsTouch = m_frameView->frame().settings()->deviceSuppor tsTouch();
60 m_popup = PopupContainer::create(m_popupClient, deviceSupportsTouch); 60 m_popup = PopupContainer::create(m_popupClient, deviceSupportsTouch);
61 } 61 }
62 m_popup->showInRect(controlPosition, controlSize, m_frameView.get(), index); 62 m_popup->showInRect(controlPosition, controlSize, m_frameView.get(), index);
63 } 63 }
64 64
65 void PopupMenuChromium::hide() 65 void PopupMenuChromium::hide()
66 { 66 {
67 if (m_popup) 67 if (m_popup)
68 m_popup->hide(); 68 m_popup->hide();
69 } 69 }
70 70
71 void PopupMenuChromium::updateFromElement() 71 void PopupMenuChromium::updateFromElement()
72 { 72 {
73 m_popup->listBox()->updateFromElement(); 73 m_popup->updateFromElement();
74 } 74 }
75 75
76 76
77 void PopupMenuChromium::disconnectClient() 77 void PopupMenuChromium::disconnectClient()
78 { 78 {
79 m_popupClient = 0; 79 m_popupClient = 0;
80 } 80 }
81 81
82 } // namespace blink 82 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/PopupListBox.cpp ('k') | Source/web/WebPopupMenuImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698