| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/webui/chrome_web_contents_handler.h" | 5 #include "chrome/browser/ui/webui/chrome_web_contents_handler.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/browser_finder.h" | 9 #include "chrome/browser/ui/browser_finder.h" |
| 10 #include "chrome/browser/ui/browser_navigator.h" | 10 #include "chrome/browser/ui/browser_navigator.h" |
| 11 #include "chrome/browser/ui/browser_navigator_params.h" |
| 11 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
| 12 #include "chrome/browser/ui/host_desktop.h" | 13 #include "chrome/browser/ui/host_desktop.h" |
| 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 14 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
| 15 | 16 |
| 16 using content::BrowserContext; | 17 using content::BrowserContext; |
| 17 using content::OpenURLParams; | 18 using content::OpenURLParams; |
| 18 using content::WebContents; | 19 using content::WebContents; |
| 19 | 20 |
| 20 ChromeWebContentsHandler::ChromeWebContentsHandler() { | 21 ChromeWebContentsHandler::ChromeWebContentsHandler() { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 params.disposition = disposition; | 105 params.disposition = disposition; |
| 105 params.window_bounds = initial_rect; | 106 params.window_bounds = initial_rect; |
| 106 params.window_action = chrome::NavigateParams::SHOW_WINDOW; | 107 params.window_action = chrome::NavigateParams::SHOW_WINDOW; |
| 107 params.user_gesture = true; | 108 params.user_gesture = true; |
| 108 chrome::Navigate(¶ms); | 109 chrome::Navigate(¶ms); |
| 109 | 110 |
| 110 // Close the browser if chrome::Navigate created a new one. | 111 // Close the browser if chrome::Navigate created a new one. |
| 111 if (browser_created && (browser != params.browser)) | 112 if (browser_created && (browser != params.browser)) |
| 112 browser->window()->Close(); | 113 browser->window()->Close(); |
| 113 } | 114 } |
| OLD | NEW |