Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 8602007: Panels: Disable auto-resize if initial size is specified during creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/base_panel_browser_test.cc » ('j') | chrome/browser/ui/panels/panel.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698