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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1686823003: Canvas capture from inactive tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | 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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 IPC_MESSAGE_HANDLER(ViewHostMsg_HideValidationMessage, 660 IPC_MESSAGE_HANDLER(ViewHostMsg_HideValidationMessage,
661 OnHideValidationMessage) 661 OnHideValidationMessage)
662 IPC_MESSAGE_HANDLER(ViewHostMsg_MoveValidationMessage, 662 IPC_MESSAGE_HANDLER(ViewHostMsg_MoveValidationMessage,
663 OnMoveValidationMessage) 663 OnMoveValidationMessage)
664 #if defined(OS_ANDROID) 664 #if defined(OS_ANDROID)
665 IPC_MESSAGE_HANDLER(FrameHostMsg_FindMatchRects_Reply, 665 IPC_MESSAGE_HANDLER(FrameHostMsg_FindMatchRects_Reply,
666 OnFindMatchRectsReply) 666 OnFindMatchRectsReply)
667 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog, 667 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog,
668 OnOpenDateTimeDialog) 668 OnOpenDateTimeDialog)
669 #endif 669 #endif
670 IPC_MESSAGE_HANDLER(FrameHostMsg_IncrementCapturerCount,
671 OnIncrementCapturerCount)
672 IPC_MESSAGE_HANDLER(FrameHostMsg_DecrementCapturerCount,
673 OnDecrementCapturerCount)
670 IPC_MESSAGE_UNHANDLED(handled = false) 674 IPC_MESSAGE_UNHANDLED(handled = false)
671 IPC_END_MESSAGE_MAP() 675 IPC_END_MESSAGE_MAP()
672 render_view_message_source_ = NULL; 676 render_view_message_source_ = NULL;
673 render_frame_message_source_ = NULL; 677 render_frame_message_source_ = NULL;
674 678
675 return handled; 679 return handled;
676 } 680 }
677 681
678 bool WebContentsImpl::HasValidFrameSource() { 682 bool WebContentsImpl::HasValidFrameSource() {
679 if (!render_frame_message_source_) { 683 if (!render_frame_message_source_) {
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
2205 if (delegate_) 2209 if (delegate_)
2206 delegate_->HideValidationMessage(this); 2210 delegate_->HideValidationMessage(this);
2207 } 2211 }
2208 2212
2209 void WebContentsImpl::OnMoveValidationMessage( 2213 void WebContentsImpl::OnMoveValidationMessage(
2210 const gfx::Rect& anchor_in_root_view) { 2214 const gfx::Rect& anchor_in_root_view) {
2211 if (delegate_) 2215 if (delegate_)
2212 delegate_->MoveValidationMessage(this, anchor_in_root_view); 2216 delegate_->MoveValidationMessage(this, anchor_in_root_view);
2213 } 2217 }
2214 2218
2219 void WebContentsImpl::OnIncrementCapturerCount() {
2220 DVLOG(3) << __FUNCTION__;
2221 IncrementCapturerCount(gfx::Size());
2222 }
2223
2224 void WebContentsImpl::OnDecrementCapturerCount() {
2225 DVLOG(3) << __FUNCTION__;
2226 DecrementCapturerCount();
2227 }
2228
2215 void WebContentsImpl::DidSendScreenRects(RenderWidgetHostImpl* rwh) { 2229 void WebContentsImpl::DidSendScreenRects(RenderWidgetHostImpl* rwh) {
2216 if (browser_plugin_embedder_) 2230 if (browser_plugin_embedder_)
2217 browser_plugin_embedder_->DidSendScreenRects(); 2231 browser_plugin_embedder_->DidSendScreenRects();
2218 } 2232 }
2219 2233
2220 BrowserAccessibilityManager* 2234 BrowserAccessibilityManager*
2221 WebContentsImpl::GetRootBrowserAccessibilityManager() { 2235 WebContentsImpl::GetRootBrowserAccessibilityManager() {
2222 RenderFrameHostImpl* rfh = GetMainFrame(); 2236 RenderFrameHostImpl* rfh = GetMainFrame();
2223 return rfh ? rfh->browser_accessibility_manager() : nullptr; 2237 return rfh ? rfh->browser_accessibility_manager() : nullptr;
2224 } 2238 }
(...skipping 2526 matching lines...) Expand 10 before | Expand all | Expand 10 after
4751 const WebContentsObserver::MediaPlayerId& id) { 4765 const WebContentsObserver::MediaPlayerId& id) {
4752 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); 4766 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id));
4753 } 4767 }
4754 4768
4755 void WebContentsImpl::MediaStoppedPlaying( 4769 void WebContentsImpl::MediaStoppedPlaying(
4756 const WebContentsObserver::MediaPlayerId& id) { 4770 const WebContentsObserver::MediaPlayerId& id) {
4757 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); 4771 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id));
4758 } 4772 }
4759 4773
4760 } // namespace content 4774 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698