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

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

Issue 251823002: Move didAccessInitialDocument to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: commentary Created 6 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) 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 : RenderWidgetHostImpl(widget_delegate, 200 : RenderWidgetHostImpl(widget_delegate,
201 instance->GetProcess(), 201 instance->GetProcess(),
202 routing_id, 202 routing_id,
203 hidden), 203 hidden),
204 frames_ref_count_(0), 204 frames_ref_count_(0),
205 delegate_(delegate), 205 delegate_(delegate),
206 instance_(static_cast<SiteInstanceImpl*>(instance)), 206 instance_(static_cast<SiteInstanceImpl*>(instance)),
207 waiting_for_drag_context_response_(false), 207 waiting_for_drag_context_response_(false),
208 enabled_bindings_(0), 208 enabled_bindings_(0),
209 navigations_suspended_(false), 209 navigations_suspended_(false),
210 has_accessed_initial_document_(false),
211 main_frame_routing_id_(main_frame_routing_id), 210 main_frame_routing_id_(main_frame_routing_id),
212 run_modal_reply_msg_(NULL), 211 run_modal_reply_msg_(NULL),
213 run_modal_opener_id_(MSG_ROUTING_NONE), 212 run_modal_opener_id_(MSG_ROUTING_NONE),
214 is_waiting_for_beforeunload_ack_(false), 213 is_waiting_for_beforeunload_ack_(false),
215 unload_ack_is_for_cross_site_transition_(false), 214 unload_ack_is_for_cross_site_transition_(false),
216 sudden_termination_allowed_(false), 215 sudden_termination_allowed_(false),
217 render_view_termination_status_(base::TERMINATION_STATUS_STILL_RUNNING), 216 render_view_termination_status_(base::TERMINATION_STATUS_STILL_RUNNING),
218 virtual_keyboard_requested_(false), 217 virtual_keyboard_requested_(false),
219 weak_factory_(this) { 218 weak_factory_(this) {
220 DCHECK(instance_.get()); 219 DCHECK(instance_.get());
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 #if defined(OS_ANDROID) 1040 #if defined(OS_ANDROID)
1042 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionRootBoundsChanged, 1041 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionRootBoundsChanged,
1043 OnSelectionRootBoundsChanged) 1042 OnSelectionRootBoundsChanged)
1044 #endif 1043 #endif
1045 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) 1044 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL)
1046 #if defined(OS_MACOSX) || defined(OS_ANDROID) 1045 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1047 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) 1046 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup)
1048 IPC_MESSAGE_HANDLER(ViewHostMsg_HidePopup, OnHidePopup) 1047 IPC_MESSAGE_HANDLER(ViewHostMsg_HidePopup, OnHidePopup)
1049 #endif 1048 #endif
1050 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) 1049 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
1051 IPC_MESSAGE_HANDLER(ViewHostMsg_DidAccessInitialDocument,
1052 OnDidAccessInitialDocument)
1053 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) 1050 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents)
1054 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, 1051 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges,
1055 OnAccessibilityLocationChanges) 1052 OnAccessibilityLocationChanges)
1056 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) 1053 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched)
1057 // Have the super handle all other messages. 1054 // Have the super handle all other messages.
1058 IPC_MESSAGE_UNHANDLED( 1055 IPC_MESSAGE_UNHANDLED(
1059 handled = RenderWidgetHostImpl::OnMessageReceived(msg)) 1056 handled = RenderWidgetHostImpl::OnMessageReceived(msg))
1060 IPC_END_MESSAGE_MAP_EX() 1057 IPC_END_MESSAGE_MAP_EX()
1061 1058
1062 if (!msg_is_ok) { 1059 if (!msg_is_ok) {
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 } else { 1678 } else {
1682 host_zoom_map->SetTemporaryZoomLevel( 1679 host_zoom_map->SetTemporaryZoomLevel(
1683 GetProcess()->GetID(), GetRoutingID(), zoom_level); 1680 GetProcess()->GetID(), GetRoutingID(), zoom_level);
1684 } 1681 }
1685 } 1682 }
1686 1683
1687 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) { 1684 void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) {
1688 delegate_->RunFileChooser(this, params); 1685 delegate_->RunFileChooser(this, params);
1689 } 1686 }
1690 1687
1691 void RenderViewHostImpl::OnDidAccessInitialDocument() {
1692 has_accessed_initial_document_ = true;
1693 delegate_->DidAccessInitialDocument();
1694 }
1695
1696 void RenderViewHostImpl::OnFocusedNodeTouched(bool editable) { 1688 void RenderViewHostImpl::OnFocusedNodeTouched(bool editable) {
1697 #if defined(OS_WIN) 1689 #if defined(OS_WIN)
1698 if (editable) { 1690 if (editable) {
1699 virtual_keyboard_requested_ = base::win::DisplayVirtualKeyboard(); 1691 virtual_keyboard_requested_ = base::win::DisplayVirtualKeyboard();
1700 } else { 1692 } else {
1701 virtual_keyboard_requested_ = false; 1693 virtual_keyboard_requested_ = false;
1702 base::win::DismissVirtualKeyboard(); 1694 base::win::DismissVirtualKeyboard();
1703 } 1695 }
1704 #endif 1696 #endif
1705 } 1697 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 return true; 1753 return true;
1762 } 1754 }
1763 1755
1764 void RenderViewHostImpl::AttachToFrameTree() { 1756 void RenderViewHostImpl::AttachToFrameTree() {
1765 FrameTree* frame_tree = delegate_->GetFrameTree(); 1757 FrameTree* frame_tree = delegate_->GetFrameTree();
1766 1758
1767 frame_tree->ResetForMainFrameSwap(); 1759 frame_tree->ResetForMainFrameSwap();
1768 } 1760 }
1769 1761
1770 } // namespace content 1762 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698