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

Side by Side Diff: services/navigation/view_impl.cc

Issue 2400243002: Remove grow box rect support, browser part. (Closed)
Patch Set: . Created 4 years, 2 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 | « services/navigation/view_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/navigation/view_impl.h" 5 #include "services/navigation/view_impl.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/public/browser/browser_context.h" 9 #include "content/public/browser/browser_context.h"
10 #include "content/public/browser/interstitial_page.h" 10 #include "content/public/browser/interstitial_page.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 new InterstitialPageDelegate(html)); 123 new InterstitialPageDelegate(html));
124 interstitial->Show(); 124 interstitial->Show();
125 } 125 }
126 126
127 void ViewImpl::HideInterstitial() { 127 void ViewImpl::HideInterstitial() {
128 // TODO(beng): this is not quite right. 128 // TODO(beng): this is not quite right.
129 if (web_view_->GetWebContents()->ShowingInterstitialPage()) 129 if (web_view_->GetWebContents()->ShowingInterstitialPage())
130 web_view_->GetWebContents()->GetInterstitialPage()->Proceed(); 130 web_view_->GetWebContents()->GetInterstitialPage()->Proceed();
131 } 131 }
132 132
133 void ViewImpl::SetResizerSize(const gfx::Size& size) {
134 resizer_size_ = size;
135 }
136
137 void ViewImpl::AddNewContents(content::WebContents* source, 133 void ViewImpl::AddNewContents(content::WebContents* source,
138 content::WebContents* new_contents, 134 content::WebContents* new_contents,
139 WindowOpenDisposition disposition, 135 WindowOpenDisposition disposition,
140 const gfx::Rect& initial_rect, 136 const gfx::Rect& initial_rect,
141 bool user_gesture, 137 bool user_gesture,
142 bool* was_blocked) { 138 bool* was_blocked) {
143 mojom::ViewClientPtr client; 139 mojom::ViewClientPtr client;
144 mojom::ViewPtr view; 140 mojom::ViewPtr view;
145 mojom::ViewRequest view_request = GetProxy(&view); 141 mojom::ViewRequest view_request = GetProxy(&view);
146 client_->ViewCreated(std::move(view), GetProxy(&client), 142 client_->ViewCreated(std::move(view), GetProxy(&client),
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 200
205 void ViewImpl::LoadProgressChanged(content::WebContents* source, 201 void ViewImpl::LoadProgressChanged(content::WebContents* source,
206 double progress) { 202 double progress) {
207 client_->LoadProgressChanged(progress); 203 client_->LoadProgressChanged(progress);
208 } 204 }
209 205
210 void ViewImpl::UpdateTargetURL(content::WebContents* source, const GURL& url) { 206 void ViewImpl::UpdateTargetURL(content::WebContents* source, const GURL& url) {
211 client_->UpdateHoverURL(url); 207 client_->UpdateHoverURL(url);
212 } 208 }
213 209
214 gfx::Rect ViewImpl::GetRootWindowResizerRect() const {
215 gfx::Rect bounds = web_view_->GetLocalBounds();
216 return gfx::Rect(bounds.right() - resizer_size_.width(),
217 bounds.bottom() - resizer_size_.height(),
218 resizer_size_.width(), resizer_size_.height());
219 }
220
221 void ViewImpl::Observe(int type, 210 void ViewImpl::Observe(int type,
222 const content::NotificationSource& source, 211 const content::NotificationSource& source,
223 const content::NotificationDetails& details) { 212 const content::NotificationDetails& details) {
224 if (content::Source<content::NavigationController>(source).ptr() != 213 if (content::Source<content::NavigationController>(source).ptr() !=
225 &web_view_->GetWebContents()->GetController()) { 214 &web_view_->GetWebContents()->GetController()) {
226 return; 215 return;
227 } 216 }
228 217
229 switch (type) { 218 switch (type) {
230 case content::NOTIFICATION_NAV_ENTRY_PENDING: { 219 case content::NOTIFICATION_NAV_ENTRY_PENDING: {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 288
300 views::Widget* ViewImpl::GetWidget() { 289 views::Widget* ViewImpl::GetWidget() {
301 return web_view_->GetWidget(); 290 return web_view_->GetWidget();
302 } 291 }
303 292
304 const views::Widget* ViewImpl::GetWidget() const { 293 const views::Widget* ViewImpl::GetWidget() const {
305 return web_view_->GetWidget(); 294 return web_view_->GetWidget();
306 } 295 }
307 296
308 } // navigation 297 } // navigation
OLDNEW
« no previous file with comments | « services/navigation/view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698