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 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 293 |
294 } // namespace | 294 } // namespace |
295 | 295 |
296 //////////////////////////////////////////////////////////////////////////////// | 296 //////////////////////////////////////////////////////////////////////////////// |
297 // Browser, CreateParams: | 297 // Browser, CreateParams: |
298 | 298 |
299 Browser::CreateParams::CreateParams(Profile* profile) | 299 Browser::CreateParams::CreateParams(Profile* profile) |
300 : type(TYPE_TABBED), | 300 : type(TYPE_TABBED), |
301 profile(profile), | 301 profile(profile), |
302 trusted_source(false), | 302 trusted_source(false), |
| 303 initial_workspace(-1), |
303 initial_show_state(ui::SHOW_STATE_DEFAULT), | 304 initial_show_state(ui::SHOW_STATE_DEFAULT), |
304 is_session_restore(false), | 305 is_session_restore(false), |
305 window(NULL) {} | 306 window(NULL) {} |
306 | 307 |
307 Browser::CreateParams::CreateParams(Type type, Profile* profile) | 308 Browser::CreateParams::CreateParams(Type type, Profile* profile) |
308 : type(type), | 309 : type(type), |
309 profile(profile), | 310 profile(profile), |
310 trusted_source(false), | 311 trusted_source(false), |
| 312 initial_workspace(-1), |
311 initial_show_state(ui::SHOW_STATE_DEFAULT), | 313 initial_show_state(ui::SHOW_STATE_DEFAULT), |
312 is_session_restore(false), | 314 is_session_restore(false), |
313 window(NULL) {} | 315 window(NULL) {} |
314 | 316 |
315 Browser::CreateParams::CreateParams(const CreateParams& other) = default; | 317 Browser::CreateParams::CreateParams(const CreateParams& other) = default; |
316 | 318 |
317 // static | 319 // static |
318 Browser::CreateParams Browser::CreateParams::CreateForApp( | 320 Browser::CreateParams Browser::CreateParams::CreateForApp( |
319 const std::string& app_name, | 321 const std::string& app_name, |
320 bool trusted_source, | 322 bool trusted_source, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 profile_(params.profile), | 374 profile_(params.profile), |
373 window_(NULL), | 375 window_(NULL), |
374 tab_strip_model_delegate_(new chrome::BrowserTabStripModelDelegate(this)), | 376 tab_strip_model_delegate_(new chrome::BrowserTabStripModelDelegate(this)), |
375 tab_strip_model_( | 377 tab_strip_model_( |
376 new TabStripModel(tab_strip_model_delegate_.get(), params.profile)), | 378 new TabStripModel(tab_strip_model_delegate_.get(), params.profile)), |
377 app_name_(params.app_name), | 379 app_name_(params.app_name), |
378 is_trusted_source_(params.trusted_source), | 380 is_trusted_source_(params.trusted_source), |
379 cancel_download_confirmation_state_(NOT_PROMPTED), | 381 cancel_download_confirmation_state_(NOT_PROMPTED), |
380 override_bounds_(params.initial_bounds), | 382 override_bounds_(params.initial_bounds), |
381 initial_show_state_(params.initial_show_state), | 383 initial_show_state_(params.initial_show_state), |
| 384 override_workspace_(params.initial_workspace), |
382 is_session_restore_(params.is_session_restore), | 385 is_session_restore_(params.is_session_restore), |
383 content_setting_bubble_model_delegate_( | 386 content_setting_bubble_model_delegate_( |
384 new BrowserContentSettingBubbleModelDelegate(this)), | 387 new BrowserContentSettingBubbleModelDelegate(this)), |
385 toolbar_model_delegate_(new BrowserToolbarModelDelegate(this)), | 388 toolbar_model_delegate_(new BrowserToolbarModelDelegate(this)), |
386 live_tab_context_(new BrowserLiveTabContext(this)), | 389 live_tab_context_(new BrowserLiveTabContext(this)), |
387 synced_window_delegate_(new BrowserSyncedWindowDelegate(this)), | 390 synced_window_delegate_(new BrowserSyncedWindowDelegate(this)), |
388 bookmark_bar_state_(BookmarkBar::HIDDEN), | 391 bookmark_bar_state_(BookmarkBar::HIDDEN), |
389 command_controller_(new chrome::BrowserCommandController(this)), | 392 command_controller_(new chrome::BrowserCommandController(this)), |
390 window_has_shown_(false), | 393 window_has_shown_(false), |
391 chrome_updater_factory_(this), | 394 chrome_updater_factory_(this), |
(...skipping 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2745 if (contents && !allow_js_access) { | 2748 if (contents && !allow_js_access) { |
2746 contents->web_contents()->GetController().LoadURL( | 2749 contents->web_contents()->GetController().LoadURL( |
2747 target_url, | 2750 target_url, |
2748 content::Referrer(), | 2751 content::Referrer(), |
2749 ui::PAGE_TRANSITION_LINK, | 2752 ui::PAGE_TRANSITION_LINK, |
2750 std::string()); // No extra headers. | 2753 std::string()); // No extra headers. |
2751 } | 2754 } |
2752 | 2755 |
2753 return contents != NULL; | 2756 return contents != NULL; |
2754 } | 2757 } |
OLD | NEW |