| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 int closing_count_; | 196 int closing_count_; |
| 197 | 197 |
| 198 DISALLOW_COPY_AND_ASSIGN(MockTabStripModelObserver); | 198 DISALLOW_COPY_AND_ASSIGN(MockTabStripModelObserver); |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 // Causes the browser to swap processes on a redirect to an HTTPS URL. | 201 // Causes the browser to swap processes on a redirect to an HTTPS URL. |
| 202 class TransferHttpsRedirectsContentBrowserClient | 202 class TransferHttpsRedirectsContentBrowserClient |
| 203 : public ChromeContentBrowserClient { | 203 : public ChromeContentBrowserClient { |
| 204 public: | 204 public: |
| 205 bool ShouldSwapProcessesForRedirect( | 205 bool ShouldSwapProcessesForRedirect( |
| 206 content::ResourceContext* resource_context, | 206 content::BrowserContext* browser_context, |
| 207 const GURL& current_url, | 207 const GURL& current_url, |
| 208 const GURL& new_url) override { | 208 const GURL& new_url) override { |
| 209 return new_url.SchemeIs(url::kHttpsScheme); | 209 return new_url.SchemeIs(url::kHttpsScheme); |
| 210 } | 210 } |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 // Used by CloseWithAppMenuOpen. Invokes CloseWindow on the supplied browser. | 213 // Used by CloseWithAppMenuOpen. Invokes CloseWindow on the supplied browser. |
| 214 void CloseWindowCallback(Browser* browser) { | 214 void CloseWindowCallback(Browser* browser) { |
| 215 chrome::CloseWindow(browser); | 215 chrome::CloseWindow(browser); |
| 216 } | 216 } |
| (...skipping 2630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2847 Browser* browser = new Browser(params); | 2847 Browser* browser = new Browser(params); |
| 2848 gfx::Rect bounds = browser->window()->GetBounds(); | 2848 gfx::Rect bounds = browser->window()->GetBounds(); |
| 2849 | 2849 |
| 2850 // Should be EXPECT_EQ, but this width is inconsistent across platforms. | 2850 // Should be EXPECT_EQ, but this width is inconsistent across platforms. |
| 2851 // See https://crbug.com/567925. | 2851 // See https://crbug.com/567925. |
| 2852 EXPECT_GE(bounds.width(), 100); | 2852 EXPECT_GE(bounds.width(), 100); |
| 2853 EXPECT_EQ(122, bounds.height()); | 2853 EXPECT_EQ(122, bounds.height()); |
| 2854 browser->window()->Close(); | 2854 browser->window()->Close(); |
| 2855 } | 2855 } |
| 2856 } | 2856 } |
| OLD | NEW |