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

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

Issue 2641403002: [refactor] - Move IsFocusedElementEditable() and ClearFocusedElement() from RenderViewHost to WebCo… (Closed)
Patch Set: Addressed sky@'s comment 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 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 // This is defensive code to avoid infinite loops due to code run inside 934 // This is defensive code to avoid infinite loops due to code run inside
935 // UpdateWebkitPreferences() accidentally updating more preferences and thus 935 // UpdateWebkitPreferences() accidentally updating more preferences and thus
936 // calling back into this code. See crbug.com/398751 for one past example. 936 // calling back into this code. See crbug.com/398751 for one past example.
937 if (updating_web_preferences_) 937 if (updating_web_preferences_)
938 return; 938 return;
939 updating_web_preferences_ = true; 939 updating_web_preferences_ = true;
940 UpdateWebkitPreferences(ComputeWebkitPrefs()); 940 UpdateWebkitPreferences(ComputeWebkitPrefs());
941 updating_web_preferences_ = false; 941 updating_web_preferences_ = false;
942 } 942 }
943 943
944 void RenderViewHostImpl::ClearFocusedElement() {
945 // TODO(ekaramad): We should move this to WebContents instead
946 // (https://crbug.com/675975).
947 if (delegate_)
948 delegate_->ClearFocusedElement();
949 }
950
951 bool RenderViewHostImpl::IsFocusedElementEditable() {
952 // TODO(ekaramad): We should move this to WebContents instead
953 // (https://crbug.com/675975).
954 return delegate_ && delegate_->IsFocusedElementEditable();
955 }
956
957 void RenderViewHostImpl::DisableScrollbarsForThreshold(const gfx::Size& size) { 944 void RenderViewHostImpl::DisableScrollbarsForThreshold(const gfx::Size& size) {
958 Send(new ViewMsg_DisableScrollbarsForSmallWindows(GetRoutingID(), size)); 945 Send(new ViewMsg_DisableScrollbarsForSmallWindows(GetRoutingID(), size));
959 } 946 }
960 947
961 void RenderViewHostImpl::EnablePreferredSizeMode() { 948 void RenderViewHostImpl::EnablePreferredSizeMode() {
962 Send(new ViewMsg_EnablePreferredSizeChangedMode(GetRoutingID())); 949 Send(new ViewMsg_EnablePreferredSizeChangedMode(GetRoutingID()));
963 } 950 }
964 951
965 void RenderViewHostImpl::EnableAutoResize(const gfx::Size& min_size, 952 void RenderViewHostImpl::EnableAutoResize(const gfx::Size& min_size,
966 const gfx::Size& max_size) { 953 const gfx::Size& max_size) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 } else { 990 } else {
1004 render_view_ready_on_process_launch_ = true; 991 render_view_ready_on_process_launch_ = true;
1005 } 992 }
1006 } 993 }
1007 994
1008 void RenderViewHostImpl::RenderViewReady() { 995 void RenderViewHostImpl::RenderViewReady() {
1009 delegate_->RenderViewReady(this); 996 delegate_->RenderViewReady(this);
1010 } 997 }
1011 998
1012 } // namespace content 999 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698