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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Rebase Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 } 895 }
896 896
897 void RenderViewHostImpl::OnFocus() { 897 void RenderViewHostImpl::OnFocus() {
898 // Note: We allow focus and blur from swapped out RenderViewHosts, even when 898 // Note: We allow focus and blur from swapped out RenderViewHosts, even when
899 // the active RenderViewHost is in a different BrowsingInstance (e.g., WebUI). 899 // the active RenderViewHost is in a different BrowsingInstance (e.g., WebUI).
900 delegate_->Activate(); 900 delegate_->Activate();
901 } 901 }
902 902
903 void RenderViewHostImpl::RenderWidgetDidForwardMouseEvent( 903 void RenderViewHostImpl::RenderWidgetDidForwardMouseEvent(
904 const blink::WebMouseEvent& mouse_event) { 904 const blink::WebMouseEvent& mouse_event) {
905 if (mouse_event.type == WebInputEvent::MouseWheel && 905 if (mouse_event.type() == WebInputEvent::MouseWheel &&
906 GetWidget()->ignore_input_events()) { 906 GetWidget()->ignore_input_events()) {
907 delegate_->OnIgnoredUIEvent(); 907 delegate_->OnIgnoredUIEvent();
908 } 908 }
909 } 909 }
910 910
911 bool RenderViewHostImpl::MayRenderWidgetForwardKeyboardEvent( 911 bool RenderViewHostImpl::MayRenderWidgetForwardKeyboardEvent(
912 const NativeWebKeyboardEvent& key_event) { 912 const NativeWebKeyboardEvent& key_event) {
913 if (GetWidget()->ignore_input_events()) { 913 if (GetWidget()->ignore_input_events()) {
914 if (key_event.type == WebInputEvent::RawKeyDown) 914 if (key_event.type() == WebInputEvent::RawKeyDown)
915 delegate_->OnIgnoredUIEvent(); 915 delegate_->OnIgnoredUIEvent();
916 return false; 916 return false;
917 } 917 }
918 return true; 918 return true;
919 } 919 }
920 920
921 WebPreferences RenderViewHostImpl::GetWebkitPreferences() { 921 WebPreferences RenderViewHostImpl::GetWebkitPreferences() {
922 if (!web_preferences_.get()) { 922 if (!web_preferences_.get()) {
923 OnWebkitPreferencesChanged(); 923 OnWebkitPreferencesChanged();
924 } 924 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 } else { 1003 } else {
1004 render_view_ready_on_process_launch_ = true; 1004 render_view_ready_on_process_launch_ = true;
1005 } 1005 }
1006 } 1006 }
1007 1007
1008 void RenderViewHostImpl::RenderViewReady() { 1008 void RenderViewHostImpl::RenderViewReady() {
1009 delegate_->RenderViewReady(this); 1009 delegate_->RenderViewReady(this);
1010 } 1010 }
1011 1011
1012 } // namespace content 1012 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698