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/browser_navigator.h" | 5 #include "chrome/browser/ui/browser_navigator.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 } | 175 } |
176 case NEW_WINDOW: { | 176 case NEW_WINDOW: { |
177 // Make a new normal browser window. | 177 // Make a new normal browser window. |
178 return new Browser(Browser::CreateParams(profile, | 178 return new Browser(Browser::CreateParams(profile, |
179 params->host_desktop_type)); | 179 params->host_desktop_type)); |
180 } | 180 } |
181 case OFF_THE_RECORD: | 181 case OFF_THE_RECORD: |
182 // Make or find an incognito window. | 182 // Make or find an incognito window. |
183 return GetOrCreateBrowser(profile->GetOffTheRecordProfile(), | 183 return GetOrCreateBrowser(profile->GetOffTheRecordProfile(), |
184 params->host_desktop_type); | 184 params->host_desktop_type); |
| 185 case PRESENTATION_WINDOW: { |
| 186 Browser::CreateParams createParams(profile, params->host_desktop_type); |
| 187 createParams.initial_bounds = params->window_bounds; |
| 188 Browser* browser = new Browser(createParams); |
| 189 browser->RequestPresentationMode(); |
| 190 return browser; |
| 191 } |
185 // The following types all result in no navigation. | 192 // The following types all result in no navigation. |
186 case SUPPRESS_OPEN: | 193 case SUPPRESS_OPEN: |
187 case SAVE_TO_DISK: | 194 case SAVE_TO_DISK: |
188 case IGNORE_ACTION: | 195 case IGNORE_ACTION: |
189 return NULL; | 196 return NULL; |
190 default: | 197 default: |
191 NOTREACHED(); | 198 NOTREACHED(); |
192 } | 199 } |
193 return NULL; | 200 return NULL; |
194 } | 201 } |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 bool reverse_on_redirect = false; | 763 bool reverse_on_redirect = false; |
757 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( | 764 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( |
758 &rewritten_url, browser_context, &reverse_on_redirect); | 765 &rewritten_url, browser_context, &reverse_on_redirect); |
759 | 766 |
760 // Some URLs are mapped to uber subpages. Do not allow them in incognito. | 767 // Some URLs are mapped to uber subpages. Do not allow them in incognito. |
761 return !(rewritten_url.scheme() == chrome::kChromeUIScheme && | 768 return !(rewritten_url.scheme() == chrome::kChromeUIScheme && |
762 rewritten_url.host() == chrome::kChromeUIUberHost); | 769 rewritten_url.host() == chrome::kChromeUIUberHost); |
763 } | 770 } |
764 | 771 |
765 } // namespace chrome | 772 } // namespace chrome |
OLD | NEW |