OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 Browser* Browser::Create(Profile* profile) { | 436 Browser* Browser::Create(Profile* profile) { |
437 Browser* browser = new Browser(TYPE_TABBED, profile); | 437 Browser* browser = new Browser(TYPE_TABBED, profile); |
438 browser->InitBrowserWindow(); | 438 browser->InitBrowserWindow(); |
439 return browser; | 439 return browser; |
440 } | 440 } |
441 | 441 |
442 // static | 442 // static |
443 Browser* Browser::CreateWithParams(const CreateParams& params) { | 443 Browser* Browser::CreateWithParams(const CreateParams& params) { |
444 Browser* browser = new Browser(params.type, params.profile); | 444 Browser* browser = new Browser(params.type, params.profile); |
445 browser->app_name_ = params.app_name; | 445 browser->app_name_ = params.app_name; |
446 if (!params.initial_bounds.IsEmpty()) | 446 browser->set_override_bounds(params.initial_bounds); |
447 browser->set_override_bounds(params.initial_bounds); | |
448 browser->InitBrowserWindow(); | 447 browser->InitBrowserWindow(); |
449 return browser; | 448 return browser; |
450 } | 449 } |
451 | 450 |
452 // static | 451 // static |
453 Browser* Browser::CreateForType(Type type, Profile* profile) { | 452 Browser* Browser::CreateForType(Type type, Profile* profile) { |
454 CreateParams params(type, profile); | 453 CreateParams params(type, profile); |
455 return CreateWithParams(params); | 454 return CreateWithParams(params); |
456 } | 455 } |
457 | 456 |
(...skipping 20 matching lines...) Expand all Loading... |
478 wm_type != ui::WM_KWIN && | 477 wm_type != ui::WM_KWIN && |
479 wm_type != ui::WM_METACITY && | 478 wm_type != ui::WM_METACITY && |
480 wm_type != ui::WM_MUTTER) { | 479 wm_type != ui::WM_MUTTER) { |
481 type = TYPE_POPUP; | 480 type = TYPE_POPUP; |
482 } | 481 } |
483 } | 482 } |
484 #endif // TOOLKIT_GTK | 483 #endif // TOOLKIT_GTK |
485 | 484 |
486 CreateParams params(type, profile); | 485 CreateParams params(type, profile); |
487 params.app_name = app_name; | 486 params.app_name = app_name; |
488 if (!window_bounds.IsEmpty()) | 487 params.initial_bounds = window_bounds; |
489 params.initial_bounds = window_bounds; | |
490 | |
491 return CreateWithParams(params); | 488 return CreateWithParams(params); |
492 } | 489 } |
493 | 490 |
494 // static | 491 // static |
495 Browser* Browser::CreateForDevTools(Profile* profile) { | 492 Browser* Browser::CreateForDevTools(Profile* profile) { |
496 #if defined(OS_CHROMEOS) | 493 #if defined(OS_CHROMEOS) |
497 CreateParams params(TYPE_TABBED, profile); | 494 CreateParams params(TYPE_TABBED, profile); |
498 #else | 495 #else |
499 CreateParams params(TYPE_POPUP, profile); | 496 CreateParams params(TYPE_POPUP, profile); |
500 #endif | 497 #endif |
(...skipping 5013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5514 } | 5511 } |
5515 | 5512 |
5516 void Browser::UpdateFullscreenExitBubbleContent() { | 5513 void Browser::UpdateFullscreenExitBubbleContent() { |
5517 GURL url; | 5514 GURL url; |
5518 if (fullscreened_tab_) | 5515 if (fullscreened_tab_) |
5519 url = fullscreened_tab_->tab_contents()->GetURL(); | 5516 url = fullscreened_tab_->tab_contents()->GetURL(); |
5520 | 5517 |
5521 window_->UpdateFullscreenExitBubbleContent( | 5518 window_->UpdateFullscreenExitBubbleContent( |
5522 url, GetFullscreenExitBubbleType()); | 5519 url, GetFullscreenExitBubbleType()); |
5523 } | 5520 } |
OLD | NEW |