| 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_window.h" | 11 #include "chrome/browser/ui/browser_window.h" |
| 12 #include "chrome/browser/ui/host_desktop.h" | |
| 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 14 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 14 #include "ui/gfx/host_desktop_type.h" |
| 15 | 15 |
| 16 using content::BrowserContext; | 16 using content::BrowserContext; |
| 17 using content::OpenURLParams; | 17 using content::OpenURLParams; |
| 18 using content::WebContents; | 18 using content::WebContents; |
| 19 | 19 |
| 20 ChromeWebContentsHandler::ChromeWebContentsHandler() { | 20 ChromeWebContentsHandler::ChromeWebContentsHandler() { |
| 21 } | 21 } |
| 22 | 22 |
| 23 ChromeWebContentsHandler::~ChromeWebContentsHandler() { | 23 ChromeWebContentsHandler::~ChromeWebContentsHandler() { |
| 24 } | 24 } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 params.disposition = disposition; | 104 params.disposition = disposition; |
| 105 params.window_bounds = initial_rect; | 105 params.window_bounds = initial_rect; |
| 106 params.window_action = chrome::NavigateParams::SHOW_WINDOW; | 106 params.window_action = chrome::NavigateParams::SHOW_WINDOW; |
| 107 params.user_gesture = true; | 107 params.user_gesture = true; |
| 108 chrome::Navigate(¶ms); | 108 chrome::Navigate(¶ms); |
| 109 | 109 |
| 110 // Close the browser if chrome::Navigate created a new one. | 110 // Close the browser if chrome::Navigate created a new one. |
| 111 if (browser_created && (browser != params.browser)) | 111 if (browser_created && (browser != params.browser)) |
| 112 browser->window()->Close(); | 112 browser->window()->Close(); |
| 113 } | 113 } |
| OLD | NEW |