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

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

Issue 2653963002: [Experimental] Supporting OOPIF printing
Patch Set: Rename service, fix for webview, and connect to DiscardableMemoryManager Created 3 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
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_proxy.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 OnGetSerializedHtmlWithLocalLinks) 1560 OnGetSerializedHtmlWithLocalLinks)
1561 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) 1561 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML)
1562 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) 1562 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind)
1563 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) 1563 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch)
1564 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) 1564 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding)
1565 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) 1565 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode)
1566 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, 1566 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs,
1567 OnSuppressFurtherDialogs) 1567 OnSuppressFurtherDialogs)
1568 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) 1568 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse)
1569 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement) 1569 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement)
1570 IPC_MESSAGE_HANDLER(FrameMsg_PrintFrame, OnPrintFrame)
1570 #if defined(OS_ANDROID) 1571 #if defined(OS_ANDROID)
1571 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, 1572 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult,
1572 OnActivateNearestFindResult) 1573 OnActivateNearestFindResult)
1573 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, 1574 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult,
1574 OnGetNearestFindResult) 1575 OnGetNearestFindResult)
1575 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) 1576 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects)
1576 #endif 1577 #endif
1577 1578
1578 #if defined(USE_EXTERNAL_POPUP_MENU) 1579 #if defined(USE_EXTERNAL_POPUP_MENU)
1579 #if defined(OS_MACOSX) 1580 #if defined(OS_MACOSX)
(...skipping 4107 matching lines...) Expand 10 before | Expand all | Expand 10 after
5687 } 5688 }
5688 } 5689 }
5689 5690
5690 void RenderFrameImpl::OnClearFocusedElement() { 5691 void RenderFrameImpl::OnClearFocusedElement() {
5691 // TODO(ekaramad): Should we add a method to WebLocalFrame instead and avoid 5692 // TODO(ekaramad): Should we add a method to WebLocalFrame instead and avoid
5692 // calling this on the WebView? 5693 // calling this on the WebView?
5693 if (auto* webview = render_view_->GetWebView()) 5694 if (auto* webview = render_view_->GetWebView())
5694 webview->clearFocusedElement(); 5695 webview->clearFocusedElement();
5695 } 5696 }
5696 5697
5698 void RenderFrameImpl::OnPrintFrame(const gfx::Rect& rect, int src_id) {
5699 // Notify our observer to set up printing.
5700 for (auto& observer : observers_)
5701 observer.PrintFrame(rect, src_id);
5702 }
5703
5697 #if defined(OS_ANDROID) 5704 #if defined(OS_ANDROID)
5698 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, 5705 void RenderFrameImpl::OnActivateNearestFindResult(int request_id,
5699 float x, 5706 float x,
5700 float y) { 5707 float y) {
5701 WebRect selection_rect; 5708 WebRect selection_rect;
5702 int ordinal = 5709 int ordinal =
5703 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); 5710 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect);
5704 if (ordinal == -1) { 5711 if (ordinal == -1) {
5705 // Something went wrong, so send a no-op reply (force the frame to report 5712 // Something went wrong, so send a no-op reply (force the frame to report
5706 // the current match count) in case the host is waiting for a response due 5713 // the current match count) in case the host is waiting for a response due
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
6833 // event target. Potentially a Pepper plugin will receive the event. 6840 // event target. Potentially a Pepper plugin will receive the event.
6834 // In order to tell whether a plugin gets the last mouse event and which it 6841 // In order to tell whether a plugin gets the last mouse event and which it
6835 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6842 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6836 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6843 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6837 // |pepper_last_mouse_event_target_|. 6844 // |pepper_last_mouse_event_target_|.
6838 pepper_last_mouse_event_target_ = nullptr; 6845 pepper_last_mouse_event_target_ = nullptr;
6839 #endif 6846 #endif
6840 } 6847 }
6841 6848
6842 } // namespace content 6849 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698