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

Side by Side Diff: Source/core/page/Chrome.cpp

Issue 19804008: Add a Blink API to set window features on a WebView. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/page/Chrome.h ('k') | Source/core/page/CreateWindow.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) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 15 matching lines...) Expand all
26 #include "HTMLNames.h" 26 #include "HTMLNames.h"
27 #include "core/dom/Document.h" 27 #include "core/dom/Document.h"
28 #include "core/html/HTMLInputElement.h" 28 #include "core/html/HTMLInputElement.h"
29 #include "core/inspector/InspectorInstrumentation.h" 29 #include "core/inspector/InspectorInstrumentation.h"
30 #include "core/page/ChromeClient.h" 30 #include "core/page/ChromeClient.h"
31 #include "core/page/Frame.h" 31 #include "core/page/Frame.h"
32 #include "core/page/FrameTree.h" 32 #include "core/page/FrameTree.h"
33 #include "core/page/Page.h" 33 #include "core/page/Page.h"
34 #include "core/page/PageGroupLoadDeferrer.h" 34 #include "core/page/PageGroupLoadDeferrer.h"
35 #include "core/page/PopupOpeningObserver.h" 35 #include "core/page/PopupOpeningObserver.h"
36 #include "core/page/WindowFeatures.h"
36 #include "core/platform/ColorChooser.h" 37 #include "core/platform/ColorChooser.h"
37 #include "core/platform/DateTimeChooser.h" 38 #include "core/platform/DateTimeChooser.h"
38 #include "core/platform/FileChooser.h" 39 #include "core/platform/FileChooser.h"
39 #include "core/platform/graphics/FloatRect.h" 40 #include "core/platform/graphics/FloatRect.h"
40 #include "core/platform/network/DNS.h" 41 #include "core/platform/network/DNS.h"
41 #include "core/rendering/HitTestResult.h" 42 #include "core/rendering/HitTestResult.h"
42 #include "wtf/PassRefPtr.h" 43 #include "wtf/PassRefPtr.h"
43 #include "wtf/Vector.h" 44 #include "wtf/Vector.h"
44 45
45 namespace WebCore { 46 namespace WebCore {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 void Chrome::runModal() const 174 void Chrome::runModal() const
174 { 175 {
175 // Defer callbacks in all the other pages in this group, so we don't try to run JavaScript 176 // Defer callbacks in all the other pages in this group, so we don't try to run JavaScript
176 // in a way that could interact with this view. 177 // in a way that could interact with this view.
177 PageGroupLoadDeferrer deferrer(m_page, false); 178 PageGroupLoadDeferrer deferrer(m_page, false);
178 179
179 TimerBase::fireTimersInNestedEventLoop(); 180 TimerBase::fireTimersInNestedEventLoop();
180 m_client->runModal(); 181 m_client->runModal();
181 } 182 }
182 183
183 void Chrome::setToolbarsVisible(bool b) const 184 void Chrome::setWindowFeatures(const WindowFeatures& features) const
184 { 185 {
185 m_client->setToolbarsVisible(b); 186 m_client->setToolbarsVisible(features.toolBarVisible || features.locationBar Visible);
187 m_client->setStatusbarVisible(features.statusBarVisible);
188 m_client->setScrollbarsVisible(features.scrollbarsVisible);
189 m_client->setMenubarVisible(features.menuBarVisible);
190 m_client->setResizable(features.resizable);
186 } 191 }
187 192
188 bool Chrome::toolbarsVisible() const 193 bool Chrome::toolbarsVisible() const
189 { 194 {
190 return m_client->toolbarsVisible(); 195 return m_client->toolbarsVisible();
191 } 196 }
192 197
193 void Chrome::setStatusbarVisible(bool b) const
194 {
195 m_client->setStatusbarVisible(b);
196 }
197
198 bool Chrome::statusbarVisible() const 198 bool Chrome::statusbarVisible() const
199 { 199 {
200 return m_client->statusbarVisible(); 200 return m_client->statusbarVisible();
201 } 201 }
202 202
203 void Chrome::setScrollbarsVisible(bool b) const
204 {
205 m_client->setScrollbarsVisible(b);
206 }
207
208 bool Chrome::scrollbarsVisible() const 203 bool Chrome::scrollbarsVisible() const
209 { 204 {
210 return m_client->scrollbarsVisible(); 205 return m_client->scrollbarsVisible();
211 } 206 }
212 207
213 void Chrome::setMenubarVisible(bool b) const
214 {
215 m_client->setMenubarVisible(b);
216 }
217
218 bool Chrome::menubarVisible() const 208 bool Chrome::menubarVisible() const
219 { 209 {
220 return m_client->menubarVisible(); 210 return m_client->menubarVisible();
221 } 211 }
222 212
223 void Chrome::setResizable(bool b) const
224 {
225 m_client->setResizable(b);
226 }
227
228 bool Chrome::canRunBeforeUnloadConfirmPanel() 213 bool Chrome::canRunBeforeUnloadConfirmPanel()
229 { 214 {
230 return m_client->canRunBeforeUnloadConfirmPanel(); 215 return m_client->canRunBeforeUnloadConfirmPanel();
231 } 216 }
232 217
233 bool Chrome::runBeforeUnloadConfirmPanel(const String& message, Frame* frame) 218 bool Chrome::runBeforeUnloadConfirmPanel(const String& message, Frame* frame)
234 { 219 {
235 // Defer loads in case the client method runs a new event loop that would 220 // Defer loads in case the client method runs a new event loop that would
236 // otherwise cause the load to continue while we're in the middle of executi ng JavaScript. 221 // otherwise cause the load to continue while we're in the middle of executi ng JavaScript.
237 PageGroupLoadDeferrer deferrer(m_page, true); 222 PageGroupLoadDeferrer deferrer(m_page, true);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 } 414 }
430 415
431 void Chrome::notifyPopupOpeningObservers() const 416 void Chrome::notifyPopupOpeningObservers() const
432 { 417 {
433 const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers); 418 const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers);
434 for (size_t i = 0; i < observers.size(); ++i) 419 for (size_t i = 0; i < observers.size(); ++i)
435 observers[i]->willOpenPopup(); 420 observers[i]->willOpenPopup();
436 } 421 }
437 422
438 } // namespace WebCore 423 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/Chrome.h ('k') | Source/core/page/CreateWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698