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

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

Issue 13467038: Browser Plugin: Expose frame name changes to the content API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 7 years, 8 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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 OnCancelDesktopNotification) 987 OnCancelDesktopNotification)
988 #if defined(OS_MACOSX) || defined(OS_ANDROID) 988 #if defined(OS_MACOSX) || defined(OS_ANDROID)
989 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) 989 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup)
990 #endif 990 #endif
991 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) 991 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
992 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse, 992 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse,
993 OnDomOperationResponse) 993 OnDomOperationResponse)
994 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Notifications, 994 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Notifications,
995 OnAccessibilityNotifications) 995 OnAccessibilityNotifications)
996 IPC_MESSAGE_HANDLER(ViewHostMsg_FrameTreeUpdated, OnFrameTreeUpdated) 996 IPC_MESSAGE_HANDLER(ViewHostMsg_FrameTreeUpdated, OnFrameTreeUpdated)
997 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFrameName, OnUpdateFrameName)
997 // Have the super handle all other messages. 998 // Have the super handle all other messages.
998 IPC_MESSAGE_UNHANDLED( 999 IPC_MESSAGE_UNHANDLED(
999 handled = RenderWidgetHostImpl::OnMessageReceived(msg)) 1000 handled = RenderWidgetHostImpl::OnMessageReceived(msg))
1000 IPC_END_MESSAGE_MAP_EX() 1001 IPC_END_MESSAGE_MAP_EX()
1001 1002
1002 if (!msg_is_ok) { 1003 if (!msg_is_ok) {
1003 // The message had a handler, but its de-serialization failed. 1004 // The message had a handler, but its de-serialization failed.
1004 // Kill the renderer. 1005 // Kill the renderer.
1005 RecordAction(UserMetricsAction("BadMessageTerminate_RVH")); 1006 RecordAction(UserMetricsAction("BadMessageTerminate_RVH"));
1006 GetProcess()->ReceivedBadMessage(); 1007 GetProcess()->ReceivedBadMessage();
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 g_created_callbacks.Get().erase(g_created_callbacks.Get().begin() + i); 1736 g_created_callbacks.Get().erase(g_created_callbacks.Get().begin() + i);
1736 return; 1737 return;
1737 } 1738 }
1738 } 1739 }
1739 } 1740 }
1740 1741
1741 void RenderViewHostImpl::SetAltErrorPageURL(const GURL& url) { 1742 void RenderViewHostImpl::SetAltErrorPageURL(const GURL& url) {
1742 Send(new ViewMsg_SetAltErrorPageURL(GetRoutingID(), url)); 1743 Send(new ViewMsg_SetAltErrorPageURL(GetRoutingID(), url));
1743 } 1744 }
1744 1745
1746 void RenderViewHostImpl::SetWindowName(const std::string& name) {
1747 Send(new ViewMsg_SetName(GetRoutingID(), name));
1748 }
1749
1745 void RenderViewHostImpl::ExitFullscreen() { 1750 void RenderViewHostImpl::ExitFullscreen() {
1746 RejectMouseLockOrUnlockIfNecessary(); 1751 RejectMouseLockOrUnlockIfNecessary();
1747 // We need to notify the contents that its fullscreen state has changed. This 1752 // We need to notify the contents that its fullscreen state has changed. This
1748 // is done as part of the resize message. 1753 // is done as part of the resize message.
1749 WasResized(); 1754 WasResized();
1750 } 1755 }
1751 1756
1752 webkit_glue::WebPreferences RenderViewHostImpl::GetWebkitPreferences() { 1757 webkit_glue::WebPreferences RenderViewHostImpl::GetWebkitPreferences() {
1753 return delegate_->GetWebkitPrefs(); 1758 return delegate_->GetWebkitPrefs();
1754 } 1759 }
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 Details<DomOperationNotificationDetails>(&details)); 2012 Details<DomOperationNotificationDetails>(&details));
2008 } 2013 }
2009 2014
2010 void RenderViewHostImpl::OnFrameTreeUpdated(const std::string& frame_tree) { 2015 void RenderViewHostImpl::OnFrameTreeUpdated(const std::string& frame_tree) {
2011 // TODO(nasko): Remove once http://crbug.com/153701 is fixed. 2016 // TODO(nasko): Remove once http://crbug.com/153701 is fixed.
2012 DCHECK(false); 2017 DCHECK(false);
2013 frame_tree_ = frame_tree; 2018 frame_tree_ = frame_tree;
2014 delegate_->DidUpdateFrameTree(this); 2019 delegate_->DidUpdateFrameTree(this);
2015 } 2020 }
2016 2021
2022 void RenderViewHostImpl::OnUpdateFrameName(int frame_id,
2023 bool is_top_level,
2024 const std::string& name) {
2025 delegate_->DidUpdateFrameName(this, frame_id, is_top_level, name);
2026 }
2027
2028
2029
2017 void RenderViewHostImpl::OnGetWindowSnapshot(const int snapshot_id) { 2030 void RenderViewHostImpl::OnGetWindowSnapshot(const int snapshot_id) {
2018 std::vector<unsigned char> png; 2031 std::vector<unsigned char> png;
2019 2032
2020 // This feature is behind the kEnableGpuBenchmarking command line switch 2033 // This feature is behind the kEnableGpuBenchmarking command line switch
2021 // because it poses security concerns and should only be used for testing. 2034 // because it poses security concerns and should only be used for testing.
2022 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 2035 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
2023 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) { 2036 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) {
2024 gfx::Rect view_bounds = GetView()->GetViewBounds(); 2037 gfx::Rect view_bounds = GetView()->GetViewBounds();
2025 gfx::Rect snapshot_bounds(view_bounds.size()); 2038 gfx::Rect snapshot_bounds(view_bounds.size());
2026 gfx::Size snapshot_size = snapshot_bounds.size(); 2039 gfx::Size snapshot_size = snapshot_bounds.size();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2062 is_waiting_for_beforeunload_ack_ = false; 2075 is_waiting_for_beforeunload_ack_ = false;
2063 is_waiting_for_unload_ack_ = false; 2076 is_waiting_for_unload_ack_ = false;
2064 has_timed_out_on_unload_ = false; 2077 has_timed_out_on_unload_ = false;
2065 } 2078 }
2066 2079
2067 void RenderViewHostImpl::ClearPowerSaveBlockers() { 2080 void RenderViewHostImpl::ClearPowerSaveBlockers() {
2068 STLDeleteValues(&power_save_blockers_); 2081 STLDeleteValues(&power_save_blockers_);
2069 } 2082 }
2070 2083
2071 } // namespace content 2084 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698