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

Side by Side Diff: chrome/browser/ui/apps/chrome_app_delegate.cc

Issue 2259533003: Use bounds instead of size for prerender requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments nit Created 4 years, 4 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 | « chrome/browser/prerender/prerender_unittest.cc ('k') | chrome/browser/ui/browser_tabrestore.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/apps/chrome_app_delegate.h" 5 #include "chrome/browser/ui/apps/chrome_app_delegate.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 DCHECK(web_contents); 209 DCHECK(web_contents);
210 content::HostZoomMap* zoom_map = 210 content::HostZoomMap* zoom_map =
211 content::HostZoomMap::GetForWebContents(web_contents); 211 content::HostZoomMap::GetForWebContents(web_contents);
212 DCHECK(zoom_map); 212 DCHECK(zoom_map);
213 zoom_map->SetZoomLevelForHost(web_contents->GetURL().host(), 0); 213 zoom_map->SetZoomLevelForHost(web_contents->GetURL().host(), 0);
214 } 214 }
215 } 215 }
216 216
217 void ChromeAppDelegate::ResizeWebContents(content::WebContents* web_contents, 217 void ChromeAppDelegate::ResizeWebContents(content::WebContents* web_contents,
218 const gfx::Size& size) { 218 const gfx::Size& size) {
219 ::ResizeWebContents(web_contents, size); 219 ::ResizeWebContents(web_contents, gfx::Rect(size));
220 } 220 }
221 221
222 content::WebContents* ChromeAppDelegate::OpenURLFromTab( 222 content::WebContents* ChromeAppDelegate::OpenURLFromTab(
223 content::BrowserContext* context, 223 content::BrowserContext* context,
224 content::WebContents* source, 224 content::WebContents* source,
225 const content::OpenURLParams& params) { 225 const content::OpenURLParams& params) {
226 return OpenURLFromTabInternal(context, params); 226 return OpenURLFromTabInternal(context, params);
227 } 227 }
228 228
229 void ChromeAppDelegate::AddNewContents(content::BrowserContext* context, 229 void ChromeAppDelegate::AddNewContents(content::BrowserContext* context,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 KeepAliveRestartOption::DISABLED)); 339 KeepAliveRestartOption::DISABLED));
340 } 340 }
341 341
342 void ChromeAppDelegate::Observe(int type, 342 void ChromeAppDelegate::Observe(int type,
343 const content::NotificationSource& source, 343 const content::NotificationSource& source,
344 const content::NotificationDetails& details) { 344 const content::NotificationDetails& details) {
345 DCHECK_EQ(chrome::NOTIFICATION_APP_TERMINATING, type); 345 DCHECK_EQ(chrome::NOTIFICATION_APP_TERMINATING, type);
346 if (!terminating_callback_.is_null()) 346 if (!terminating_callback_.is_null())
347 terminating_callback_.Run(); 347 terminating_callback_.Run();
348 } 348 }
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_unittest.cc ('k') | chrome/browser/ui/browser_tabrestore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698