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

Side by Side Diff: third_party/WebKit/Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 7538006: Pepper and WebKit API change to support a plugin knowing if a scrollbar is an overlay one. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Redo by adding ScrollbarGroup to pepper and WebKit Created 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 // deleted. 993 // deleted.
994 m_client = 0; 994 m_client = 0;
995 995
996 deref(); // Balances ref() acquired in WebView::create 996 deref(); // Balances ref() acquired in WebView::create
997 } 997 }
998 998
999 void WebViewImpl::willStartLiveResize() 999 void WebViewImpl::willStartLiveResize()
1000 { 1000 {
1001 if (mainFrameImpl() && mainFrameImpl()->frameView()) 1001 if (mainFrameImpl() && mainFrameImpl()->frameView())
1002 mainFrameImpl()->frameView()->willStartLiveResize(); 1002 mainFrameImpl()->frameView()->willStartLiveResize();
1003
1004 Frame* frame = mainFrameImpl()->frame();
1005 WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromF rame(frame);
1006 if (pluginContainer)
1007 pluginContainer->plugin()->willStartLiveResize();
1003 } 1008 }
1004 1009
1005 void WebViewImpl::resize(const WebSize& newSize) 1010 void WebViewImpl::resize(const WebSize& newSize)
1006 { 1011 {
1007 if (m_size == newSize) 1012 if (m_size == newSize)
1008 return; 1013 return;
1009 m_size = newSize; 1014 m_size = newSize;
1010 1015
1011 if (mainFrameImpl()->frameView()) { 1016 if (mainFrameImpl()->frameView()) {
1012 mainFrameImpl()->frameView()->resize(m_size.width, m_size.height); 1017 mainFrameImpl()->frameView()->resize(m_size.width, m_size.height);
1013 mainFrameImpl()->frame()->eventHandler()->sendResizeEvent(); 1018 mainFrameImpl()->frame()->eventHandler()->sendResizeEvent();
1014 } 1019 }
1015 1020
1016 if (m_client) { 1021 if (m_client) {
1017 if (isAcceleratedCompositingActive()) { 1022 if (isAcceleratedCompositingActive()) {
1018 #if USE(ACCELERATED_COMPOSITING) 1023 #if USE(ACCELERATED_COMPOSITING)
1019 updateLayerRendererViewport(); 1024 updateLayerRendererViewport();
1020 #endif 1025 #endif
1021 } else { 1026 } else {
1022 WebRect damagedRect(0, 0, m_size.width, m_size.height); 1027 WebRect damagedRect(0, 0, m_size.width, m_size.height);
1023 m_client->didInvalidateRect(damagedRect); 1028 m_client->didInvalidateRect(damagedRect);
1024 } 1029 }
1025 } 1030 }
1026 } 1031 }
1027 1032
1028 void WebViewImpl::willEndLiveResize() 1033 void WebViewImpl::willEndLiveResize()
1029 { 1034 {
1030 if (mainFrameImpl() && mainFrameImpl()->frameView()) 1035 if (mainFrameImpl() && mainFrameImpl()->frameView())
1031 mainFrameImpl()->frameView()->willEndLiveResize(); 1036 mainFrameImpl()->frameView()->willEndLiveResize();
1037
1038 Frame* frame = mainFrameImpl()->frame();
1039 WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromF rame(frame);
1040 if (pluginContainer)
1041 pluginContainer->plugin()->willEndLiveResize();
1032 } 1042 }
1033 1043
1034 void WebViewImpl::animate(double frameBeginTime) 1044 void WebViewImpl::animate(double frameBeginTime)
1035 { 1045 {
1036 #if ENABLE(REQUEST_ANIMATION_FRAME) 1046 #if ENABLE(REQUEST_ANIMATION_FRAME)
1037 TRACE_EVENT("WebViewImpl::animate", this, 0); 1047 TRACE_EVENT("WebViewImpl::animate", this, 0);
1038 // FIXME: remove this zero-check once render_widget has been modified to 1048 // FIXME: remove this zero-check once render_widget has been modified to
1039 // pass in a frameBeginTime. 1049 // pass in a frameBeginTime.
1040 if (!frameBeginTime) 1050 if (!frameBeginTime)
1041 frameBeginTime = currentTime(); 1051 frameBeginTime = currentTime();
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after
2705 2715
2706 #if ENABLE(GESTURE_RECOGNIZER) 2716 #if ENABLE(GESTURE_RECOGNIZER)
2707 void WebViewImpl::resetGestureRecognizer() 2717 void WebViewImpl::resetGestureRecognizer()
2708 { 2718 {
2709 m_gestureRecognizer->reset(); 2719 m_gestureRecognizer->reset();
2710 } 2720 }
2711 #endif 2721 #endif
2712 2722
2713 2723
2714 } // namespace WebKit 2724 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698