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

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

Issue 554743009: remove main_render_frame(), use GetMainRenderFrame() instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 3 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
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 } 1959 }
1960 1960
1961 void RenderViewImpl::focusedNodeChanged(const WebNode& node) { 1961 void RenderViewImpl::focusedNodeChanged(const WebNode& node) {
1962 has_scrolled_focused_editable_node_into_rect_ = false; 1962 has_scrolled_focused_editable_node_into_rect_ = false;
1963 1963
1964 Send(new ViewHostMsg_FocusedNodeChanged(routing_id_, IsEditableNode(node))); 1964 Send(new ViewHostMsg_FocusedNodeChanged(routing_id_, IsEditableNode(node)));
1965 1965
1966 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node)); 1966 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node));
1967 1967
1968 // TODO(dmazzoni): this should be part of RenderFrameObserver. 1968 // TODO(dmazzoni): this should be part of RenderFrameObserver.
1969 main_render_frame()->FocusedNodeChanged(node); 1969 GetMainRenderFrame()->FocusedNodeChanged(node);
1970 } 1970 }
1971 1971
1972 void RenderViewImpl::didUpdateLayout() { 1972 void RenderViewImpl::didUpdateLayout() {
1973 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidUpdateLayout()); 1973 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidUpdateLayout());
1974 1974
1975 // We don't always want to set up a timer, only if we've been put in that 1975 // We don't always want to set up a timer, only if we've been put in that
1976 // mode by getting a |ViewMsg_EnablePreferredSizeChangedMode| 1976 // mode by getting a |ViewMsg_EnablePreferredSizeChangedMode|
1977 // message. 1977 // message.
1978 if (!send_preferred_size_changes_ || !webview()) 1978 if (!send_preferred_size_changes_ || !webview())
1979 return; 1979 return;
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
2456 data.data(), 2456 data.data(),
2457 static_cast<int32>(status))); 2457 static_cast<int32>(status)));
2458 } 2458 }
2459 2459
2460 // RenderView implementation --------------------------------------------------- 2460 // RenderView implementation ---------------------------------------------------
2461 2461
2462 bool RenderViewImpl::Send(IPC::Message* message) { 2462 bool RenderViewImpl::Send(IPC::Message* message) {
2463 return RenderWidget::Send(message); 2463 return RenderWidget::Send(message);
2464 } 2464 }
2465 2465
2466 RenderFrame* RenderViewImpl::GetMainRenderFrame() { 2466 RenderFrameImpl* RenderViewImpl::GetMainRenderFrame() {
2467 return main_render_frame_.get(); 2467 return main_render_frame_.get();
2468 } 2468 }
2469 2469
2470 int RenderViewImpl::GetRoutingID() const { 2470 int RenderViewImpl::GetRoutingID() const {
2471 return routing_id_; 2471 return routing_id_;
2472 } 2472 }
2473 2473
2474 gfx::Size RenderViewImpl::GetSize() const { 2474 gfx::Size RenderViewImpl::GetSize() const {
2475 return size(); 2475 return size();
2476 } 2476 }
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
4031 main_frame->enableViewSourceMode(true); 4031 main_frame->enableViewSourceMode(true);
4032 } 4032 }
4033 4033
4034 #if defined(OS_ANDROID) 4034 #if defined(OS_ANDROID)
4035 bool RenderViewImpl::didTapMultipleTargets( 4035 bool RenderViewImpl::didTapMultipleTargets(
4036 const blink::WebGestureEvent& event, 4036 const blink::WebGestureEvent& event,
4037 const WebVector<WebRect>& target_rects) { 4037 const WebVector<WebRect>& target_rects) {
4038 // Never show a disambiguation popup when accessibility is enabled, 4038 // Never show a disambiguation popup when accessibility is enabled,
4039 // as this interferes with "touch exploration". 4039 // as this interferes with "touch exploration".
4040 AccessibilityMode accessibility_mode = 4040 AccessibilityMode accessibility_mode =
4041 main_render_frame()->accessibility_mode(); 4041 GetMainRenderFrame()->accessibility_mode();
4042 bool matches_accessibility_mode_complete = 4042 bool matches_accessibility_mode_complete =
4043 (accessibility_mode & AccessibilityModeComplete) == 4043 (accessibility_mode & AccessibilityModeComplete) ==
4044 AccessibilityModeComplete; 4044 AccessibilityModeComplete;
4045 if (matches_accessibility_mode_complete) 4045 if (matches_accessibility_mode_complete)
4046 return false; 4046 return false;
4047 4047
4048 gfx::Rect finger_rect( 4048 gfx::Rect finger_rect(
4049 event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2, 4049 event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2,
4050 event.data.tap.width, event.data.tap.height); 4050 event.data.tap.width, event.data.tap.height);
4051 gfx::Rect zoom_rect; 4051 gfx::Rect zoom_rect;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
4200 std::vector<gfx::Size> sizes; 4200 std::vector<gfx::Size> sizes;
4201 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4201 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4202 if (!url.isEmpty()) 4202 if (!url.isEmpty())
4203 urls.push_back( 4203 urls.push_back(
4204 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4204 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4205 } 4205 }
4206 SendUpdateFaviconURL(urls); 4206 SendUpdateFaviconURL(urls);
4207 } 4207 }
4208 4208
4209 } // namespace content 4209 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698