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

Side by Side Diff: content/renderer/render_view.cc

Issue 6998002: Send live resize messages to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view.h" 5 #include "content/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 OnPpapiBrokerChannelCreated) 670 OnPpapiBrokerChannelCreated)
671 #if defined(OS_MACOSX) 671 #if defined(OS_MACOSX)
672 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) 672 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItem, OnSelectPopupMenuItem)
673 #endif 673 #endif
674 IPC_MESSAGE_HANDLER(ViewMsg_ContextMenuClosed, OnContextMenuClosed) 674 IPC_MESSAGE_HANDLER(ViewMsg_ContextMenuClosed, OnContextMenuClosed)
675 IPC_MESSAGE_HANDLER(ViewMsg_NetworkStateChanged, OnNetworkStateChanged) 675 IPC_MESSAGE_HANDLER(ViewMsg_NetworkStateChanged, OnNetworkStateChanged)
676 // TODO(viettrungluu): Move to a separate message filter. 676 // TODO(viettrungluu): Move to a separate message filter.
677 #if defined(ENABLE_FLAPPER_HACKS) 677 #if defined(ENABLE_FLAPPER_HACKS)
678 IPC_MESSAGE_HANDLER(PepperMsg_ConnectTcpACK, OnConnectTcpACK) 678 IPC_MESSAGE_HANDLER(PepperMsg_ConnectTcpACK, OnConnectTcpACK)
679 #endif 679 #endif
680 #if defined(OS_MACOSX)
681 IPC_MESSAGE_HANDLER(ViewMsg_SetInLiveResize, OnSetInLiveResize)
682 #endif
680 683
681 // Have the super handle all other messages. 684 // Have the super handle all other messages.
682 IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message)) 685 IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message))
683 IPC_END_MESSAGE_MAP() 686 IPC_END_MESSAGE_MAP()
684 return handled; 687 return handled;
685 } 688 }
686 689
687 void RenderView::OnNavigate(const ViewMsg_Navigate_Params& params) { 690 void RenderView::OnNavigate(const ViewMsg_Navigate_Params& params) {
688 if (!webview()) 691 if (!webview())
689 return; 692 return;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 webview()->focusedFrame()->executeCommand( 913 webview()->focusedFrame()->executeCommand(
911 WebString::fromUTF8("SelectAll")); 914 WebString::fromUTF8("SelectAll"));
912 } 915 }
913 916
914 void RenderView::OnSetInitialFocus(bool reverse) { 917 void RenderView::OnSetInitialFocus(bool reverse) {
915 if (!webview()) 918 if (!webview())
916 return; 919 return;
917 webview()->setInitialFocus(reverse); 920 webview()->setInitialFocus(reverse);
918 } 921 }
919 922
923 #if defined(OS_MACOSX)
924 void RenderView::OnSetInLiveResize(bool in_live_resize) {
925 if (!webview())
926 return;
927 if (in_live_resize)
928 webview()->willStartLiveResize();
929 else
930 webview()->willEndLiveResize();
931 }
932 #endif
933
920 void RenderView::OnScrollFocusedEditableNodeIntoView() { 934 void RenderView::OnScrollFocusedEditableNodeIntoView() {
921 WebKit::WebNode node = GetFocusedNode(); 935 WebKit::WebNode node = GetFocusedNode();
922 if (!node.isNull()) { 936 if (!node.isNull()) {
923 if (IsEditableNode(node)) 937 if (IsEditableNode(node))
924 // TODO(varunjain): Change webkit API to scroll a particular node into 938 // TODO(varunjain): Change webkit API to scroll a particular node into
925 // view and use that API here instead. 939 // view and use that API here instead.
926 webview()->scrollFocusedNodeIntoView(); 940 webview()->scrollFocusedNodeIntoView();
927 } 941 }
928 } 942 }
929 943
(...skipping 3292 matching lines...) Expand 10 before | Expand all | Expand 10 after
4222 const webkit_glue::CustomContextMenuContext& custom_context) { 4236 const webkit_glue::CustomContextMenuContext& custom_context) {
4223 if (custom_context.is_pepper_menu) 4237 if (custom_context.is_pepper_menu)
4224 pepper_delegate_.OnContextMenuClosed(custom_context); 4238 pepper_delegate_.OnContextMenuClosed(custom_context);
4225 else 4239 else
4226 context_menu_node_.reset(); 4240 context_menu_node_.reset();
4227 } 4241 }
4228 4242
4229 void RenderView::OnNetworkStateChanged(bool online) { 4243 void RenderView::OnNetworkStateChanged(bool online) {
4230 WebNetworkStateNotifier::setOnLine(online); 4244 WebNetworkStateNotifier::setOnLine(online);
4231 } 4245 }
OLDNEW
« content/common/view_messages.h ('K') | « content/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698