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

Side by Side Diff: Source/core/html/shadow/PickerIndicatorElement.cpp

Issue 15820002: Page::chrome() should return a reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/TextFieldInputType.cpp ('k') | Source/core/html/shadow/SpinButtonElement.cpp » ('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) 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 void PickerIndicatorElement::openPopup() 105 void PickerIndicatorElement::openPopup()
106 { 106 {
107 if (m_chooser) 107 if (m_chooser)
108 return; 108 return;
109 if (!document()->page()) 109 if (!document()->page())
110 return; 110 return;
111 if (!m_pickerIndicatorOwner) 111 if (!m_pickerIndicatorOwner)
112 return; 112 return;
113 Chrome* chrome = document()->page()->chrome();
114 if (!chrome)
115 return;
116 DateTimeChooserParameters parameters; 113 DateTimeChooserParameters parameters;
117 if (!m_pickerIndicatorOwner->setupDateTimeChooserParameters(parameters)) 114 if (!m_pickerIndicatorOwner->setupDateTimeChooserParameters(parameters))
118 return; 115 return;
119 m_chooser = chrome->openDateTimeChooser(this, parameters); 116 m_chooser = document()->page()->chrome().openDateTimeChooser(this, parameter s);
120 } 117 }
121 118
122 void PickerIndicatorElement::closePopup() 119 void PickerIndicatorElement::closePopup()
123 { 120 {
124 if (!m_chooser) 121 if (!m_chooser)
125 return; 122 return;
126 m_chooser->endChooser(); 123 m_chooser->endChooser();
127 } 124 }
128 125
129 void PickerIndicatorElement::detach() 126 void PickerIndicatorElement::detach()
130 { 127 {
131 closePopup(); 128 closePopup();
132 HTMLDivElement::detach(); 129 HTMLDivElement::detach();
133 } 130 }
134 131
135 } 132 }
136 133
137 #endif 134 #endif
OLDNEW
« no previous file with comments | « Source/core/html/TextFieldInputType.cpp ('k') | Source/core/html/shadow/SpinButtonElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698