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

Side by Side Diff: extensions/browser/app_window/app_window_contents.cc

Issue 2929493003: Move handling of DraggableRegionsChanged notification from "view" to "frame". (Closed)
Patch Set: Removing the CHECK used to find test coverage [found in LaunchWebAuthFlowFunctionTest]. Created 3 years, 6 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 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 "extensions/browser/app_window/app_window_contents.h" 5 #include "extensions/browser/app_window/app_window_contents.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 content::WebContents* AppWindowContentsImpl::GetWebContents() const { 92 content::WebContents* AppWindowContentsImpl::GetWebContents() const {
93 return web_contents_.get(); 93 return web_contents_.get();
94 } 94 }
95 95
96 WindowController* AppWindowContentsImpl::GetWindowController() const { 96 WindowController* AppWindowContentsImpl::GetWindowController() const {
97 return nullptr; 97 return nullptr;
98 } 98 }
99 99
100 bool AppWindowContentsImpl::OnMessageReceived(const IPC::Message& message) { 100 bool AppWindowContentsImpl::OnMessageReceived(
101 const IPC::Message& message,
102 content::RenderFrameHost* sender) {
101 bool handled = true; 103 bool handled = true;
102 IPC_BEGIN_MESSAGE_MAP(AppWindowContentsImpl, message) 104 IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(AppWindowContentsImpl, message, sender)
103 IPC_MESSAGE_HANDLER(ExtensionHostMsg_UpdateDraggableRegions, 105 IPC_MESSAGE_HANDLER(ExtensionHostMsg_UpdateDraggableRegions,
104 UpdateDraggableRegions) 106 UpdateDraggableRegions)
105 IPC_MESSAGE_UNHANDLED(handled = false) 107 IPC_MESSAGE_UNHANDLED(handled = false)
106 IPC_END_MESSAGE_MAP() 108 IPC_END_MESSAGE_MAP()
107 return handled; 109 return handled;
108 } 110 }
109 111
110 void AppWindowContentsImpl::ReadyToCommitNavigation( 112 void AppWindowContentsImpl::ReadyToCommitNavigation(
111 content::NavigationHandle* handle) { 113 content::NavigationHandle* handle) {
112 if (!is_window_ready_) 114 if (!is_window_ready_)
113 host_->OnReadyToCommitFirstNavigation(); 115 host_->OnReadyToCommitFirstNavigation();
114 } 116 }
115 117
116 void AppWindowContentsImpl::UpdateDraggableRegions( 118 void AppWindowContentsImpl::UpdateDraggableRegions(
119 content::RenderFrameHost* sender,
117 const std::vector<DraggableRegion>& regions) { 120 const std::vector<DraggableRegion>& regions) {
Łukasz Anforowicz 2017/06/07 18:25:03 Test coverage of this CL is not that great: - The
118 host_->UpdateDraggableRegions(regions); 121 host_->UpdateDraggableRegions(regions);
119 } 122 }
120 123
121 void AppWindowContentsImpl::SuspendRenderFrameHost( 124 void AppWindowContentsImpl::SuspendRenderFrameHost(
122 content::RenderFrameHost* rfh) { 125 content::RenderFrameHost* rfh) {
123 DCHECK(rfh); 126 DCHECK(rfh);
124 // Don't bother blocking requests if the renderer side is already good to go. 127 // Don't bother blocking requests if the renderer side is already good to go.
125 if (is_window_ready_) 128 if (is_window_ready_)
126 return; 129 return;
127 is_blocking_requests_ = true; 130 is_blocking_requests_ = true;
128 rfh->BlockRequestsForFrame(); 131 rfh->BlockRequestsForFrame();
129 } 132 }
130 133
131 } // namespace extensions 134 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698