| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 int closing_count_; | 199 int closing_count_; |
| 200 | 200 |
| 201 DISALLOW_COPY_AND_ASSIGN(MockTabStripModelObserver); | 201 DISALLOW_COPY_AND_ASSIGN(MockTabStripModelObserver); |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 // Causes the browser to swap processes on a redirect to an HTTPS URL. | 204 // Causes the browser to swap processes on a redirect to an HTTPS URL. |
| 205 class TransferHttpsRedirectsContentBrowserClient | 205 class TransferHttpsRedirectsContentBrowserClient |
| 206 : public ChromeContentBrowserClient { | 206 : public ChromeContentBrowserClient { |
| 207 public: | 207 public: |
| 208 bool ShouldSwapProcessesForRedirect( | 208 bool ShouldSwapProcessesForRedirect( |
| 209 content::ResourceContext* resource_context, | 209 content::BrowserContext* browser_context, |
| 210 const GURL& current_url, | 210 const GURL& current_url, |
| 211 const GURL& new_url) override { | 211 const GURL& new_url) override { |
| 212 return new_url.SchemeIs(url::kHttpsScheme); | 212 return new_url.SchemeIs(url::kHttpsScheme); |
| 213 } | 213 } |
| 214 }; | 214 }; |
| 215 | 215 |
| 216 // Used by CloseWithAppMenuOpen. Invokes CloseWindow on the supplied browser. | 216 // Used by CloseWithAppMenuOpen. Invokes CloseWindow on the supplied browser. |
| 217 void CloseWindowCallback(Browser* browser) { | 217 void CloseWindowCallback(Browser* browser) { |
| 218 chrome::CloseWindow(browser); | 218 chrome::CloseWindow(browser); |
| 219 } | 219 } |
| (...skipping 2661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2881 Browser* browser = new Browser(params); | 2881 Browser* browser = new Browser(params); |
| 2882 gfx::Rect bounds = browser->window()->GetBounds(); | 2882 gfx::Rect bounds = browser->window()->GetBounds(); |
| 2883 | 2883 |
| 2884 // Should be EXPECT_EQ, but this width is inconsistent across platforms. | 2884 // Should be EXPECT_EQ, but this width is inconsistent across platforms. |
| 2885 // See https://crbug.com/567925. | 2885 // See https://crbug.com/567925. |
| 2886 EXPECT_GE(bounds.width(), 100); | 2886 EXPECT_GE(bounds.width(), 100); |
| 2887 EXPECT_EQ(122, bounds.height()); | 2887 EXPECT_EQ(122, bounds.height()); |
| 2888 browser->window()->Close(); | 2888 browser->window()->Close(); |
| 2889 } | 2889 } |
| 2890 } | 2890 } |
| OLD | NEW |