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

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

Issue 469693003: Cleanup: Remove getSmartClipData function from WebView API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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') | public/web/WebView.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) 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 3552 matching lines...) Expand 10 before | Expand all | Expand 10 after
3563 if (!page()) 3563 if (!page())
3564 return; 3564 return;
3565 3565
3566 page()->contextMenuController().clearContextMenu(); 3566 page()->contextMenuController().clearContextMenu();
3567 m_contextMenuAllowed = true; 3567 m_contextMenuAllowed = true;
3568 if (LocalFrame* focusedFrame = toLocalFrame(page()->focusController().focuse dOrMainFrame())) 3568 if (LocalFrame* focusedFrame = toLocalFrame(page()->focusController().focuse dOrMainFrame()))
3569 focusedFrame->eventHandler().sendContextMenuEventForKey(); 3569 focusedFrame->eventHandler().sendContextMenuEventForKey();
3570 m_contextMenuAllowed = false; 3570 m_contextMenuAllowed = false;
3571 } 3571 }
3572 3572
3573 void WebViewImpl::getSmartClipData(WebRect rect, WebString& clipText, WebRect& c lipRect)
3574 {
3575 LocalFrame* frame = toLocalFrame(focusedWebCoreFrame());
3576 if (!frame)
3577 return;
3578 SmartClipData clipData = blink::SmartClip(frame).dataForRect(rect);
3579 clipText = clipData.clipData();
3580 clipRect = clipData.rect();
3581 }
3582
3583 void WebViewImpl::extractSmartClipData(WebRect rect, WebString& clipText, WebStr ing& clipHtml, WebRect& clipRect) 3573 void WebViewImpl::extractSmartClipData(WebRect rect, WebString& clipText, WebStr ing& clipHtml, WebRect& clipRect)
3584 { 3574 {
3585 LocalFrame* localFrame = toLocalFrame(focusedWebCoreFrame()); 3575 LocalFrame* localFrame = toLocalFrame(focusedWebCoreFrame());
3586 if (!localFrame) 3576 if (!localFrame)
3587 return; 3577 return;
3588 SmartClipData clipData = blink::SmartClip(localFrame).dataForRect(rect); 3578 SmartClipData clipData = blink::SmartClip(localFrame).dataForRect(rect);
3589 clipText = clipData.clipData(); 3579 clipText = clipData.clipData();
3590 clipRect = clipData.rect(); 3580 clipRect = clipData.rect();
3591 3581
3592 WebLocalFrameImpl* frame = mainFrameImpl(); 3582 WebLocalFrameImpl* frame = mainFrameImpl();
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
4269 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4259 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4270 4260
4271 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4261 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4272 return false; 4262 return false;
4273 4263
4274 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4264 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4275 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4265 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4276 } 4266 }
4277 4267
4278 } // namespace blink 4268 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698