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

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

Issue 1162263007: Cleanup: Move code common in ChromeClient JavaScript dialog functions to a function template. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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/web/ChromeClientImpl.h ('k') | no next file » | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 lineNumber, 371 lineNumber,
372 stackTrace); 372 stackTrace);
373 } 373 }
374 } 374 }
375 375
376 bool ChromeClientImpl::canRunBeforeUnloadConfirmPanel() 376 bool ChromeClientImpl::canRunBeforeUnloadConfirmPanel()
377 { 377 {
378 return !!m_webView->client(); 378 return !!m_webView->client();
379 } 379 }
380 380
381 bool ChromeClientImpl::runBeforeUnloadConfirmPanelInternal(const String& message , LocalFrame* frame) 381 bool ChromeClientImpl::runBeforeUnloadConfirmPanelInternal(LocalFrame* frame, co nst String& message)
382 { 382 {
383 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); 383 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame);
384 384
385 bool isReload = false; 385 bool isReload = false;
386 WebDataSource* ds = webframe->provisionalDataSource(); 386 WebDataSource* ds = webframe->provisionalDataSource();
387 if (ds) 387 if (ds)
388 isReload = (ds->navigationType() == WebNavigationTypeReload); 388 isReload = (ds->navigationType() == WebNavigationTypeReload);
389 389
390 if (webframe->client()) 390 if (webframe->client())
391 return webframe->client()->runModalBeforeUnloadDialog(isReload, message) ; 391 return webframe->client()->runModalBeforeUnloadDialog(isReload, message) ;
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView()) 922 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView())
923 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie w(m_webView->layerTreeView()); 923 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie w(m_webView->layerTreeView());
924 } 924 }
925 925
926 void ChromeClientImpl::didUpdateTopControls() const 926 void ChromeClientImpl::didUpdateTopControls() const
927 { 927 {
928 m_webView->didUpdateTopControls(); 928 m_webView->didUpdateTopControls();
929 } 929 }
930 930
931 } // namespace blink 931 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ChromeClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698