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

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

Issue 665763002: Oilpan: move context menu providers to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated GC_PLUGIN_IGNORE() Created 6 years, 2 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/WebViewImpl.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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 m_contextMenuAllowed = true; 1411 m_contextMenuAllowed = true;
1412 Frame* focusedFrame = page()->focusController().focusedOrMainFrame(); 1412 Frame* focusedFrame = page()->focusController().focusedOrMainFrame();
1413 if (!focusedFrame->isLocalFrame()) 1413 if (!focusedFrame->isLocalFrame())
1414 return false; 1414 return false;
1415 bool handled = toLocalFrame(focusedFrame)->eventHandler().sendContextMenuEve ntForKey(); 1415 bool handled = toLocalFrame(focusedFrame)->eventHandler().sendContextMenuEve ntForKey();
1416 m_contextMenuAllowed = false; 1416 m_contextMenuAllowed = false;
1417 return handled; 1417 return handled;
1418 } 1418 }
1419 #endif 1419 #endif
1420 1420
1421 void WebViewImpl::showContextMenuAtPoint(float x, float y, PassRefPtr<ContextMen uProvider> menuProvider) 1421 void WebViewImpl::showContextMenuAtPoint(float x, float y, PassRefPtrWillBeRawPt r<ContextMenuProvider> menuProvider)
1422 { 1422 {
1423 if (!page()->mainFrame()->isLocalFrame()) 1423 if (!page()->mainFrame()->isLocalFrame())
1424 return; 1424 return;
1425 m_contextMenuAllowed = true; 1425 m_contextMenuAllowed = true;
1426 page()->contextMenuController().clearContextMenu(); 1426 page()->contextMenuController().clearContextMenu();
1427 page()->contextMenuController().showContextMenuAtPoint(page()->deprecatedLoc alMainFrame(), x, y, menuProvider); 1427 page()->contextMenuController().showContextMenuAtPoint(page()->deprecatedLoc alMainFrame(), x, y, menuProvider);
1428 m_contextMenuAllowed = false; 1428 m_contextMenuAllowed = false;
1429 } 1429 }
1430 1430
1431 bool WebViewImpl::keyEventDefault(const WebKeyboardEvent& event) 1431 bool WebViewImpl::keyEventDefault(const WebKeyboardEvent& event)
(...skipping 3034 matching lines...) Expand 10 before | Expand all | Expand 10 after
4466 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4466 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4467 4467
4468 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4468 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4469 return false; 4469 return false;
4470 4470
4471 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4471 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4472 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4472 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4473 } 4473 }
4474 4474
4475 } // namespace blink 4475 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698