OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/chromeos/frame/browser_view.h" | 5 #include "chrome/browser/chromeos/frame/browser_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "app/menus/simple_menu_model.h" | 10 #include "app/menus/simple_menu_model.h" |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
426 | 426 |
427 views::LayoutManager* BrowserView::CreateLayoutManager() const { | 427 views::LayoutManager* BrowserView::CreateLayoutManager() const { |
428 return new BrowserViewLayout(); | 428 return new BrowserViewLayout(); |
429 } | 429 } |
430 | 430 |
431 BaseTabStrip* BrowserView::CreateTabStrip( | 431 BaseTabStrip* BrowserView::CreateTabStrip( |
432 TabStripModel* tab_strip_model) { | 432 TabStripModel* tab_strip_model) { |
433 return new ChromeosTabStrip(tab_strip_model, this); | 433 return new ChromeosTabStrip(tab_strip_model, this); |
434 } | 434 } |
435 | 435 |
436 void BrowserView::ChildPreferredSizeChanged(View* child) { | |
437 Layout(); | |
sky
2010/04/08 22:39:20
Do a SchedulePaint after this too.
| |
438 } | |
439 | |
436 // views::ButtonListener overrides. | 440 // views::ButtonListener overrides. |
437 void BrowserView::ButtonPressed(views::Button* sender, | 441 void BrowserView::ButtonPressed(views::Button* sender, |
438 const views::Event& event) { | 442 const views::Event& event) { |
439 gfx::Rect bounds = main_menu_button_->bounds(); | 443 gfx::Rect bounds = main_menu_button_->bounds(); |
440 gfx::Point origin = bounds.origin(); | 444 gfx::Point origin = bounds.origin(); |
441 // Move the origin to the right otherwise the app launcher info bubble left | 445 // Move the origin to the right otherwise the app launcher info bubble left |
442 // border will show out of screen. | 446 // border will show out of screen. |
443 origin.Offset(kAppLauncherLeftPadding, 0); | 447 origin.Offset(kAppLauncherLeftPadding, 0); |
444 views::RootView::ConvertPointToScreen(this, &origin); | 448 views::RootView::ConvertPointToScreen(this, &origin); |
445 bounds.set_origin(origin); | 449 bounds.set_origin(origin); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
518 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 522 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
519 // Create a browser view for chromeos. | 523 // Create a browser view for chromeos. |
520 BrowserView* view; | 524 BrowserView* view; |
521 if (browser->type() & Browser::TYPE_POPUP) | 525 if (browser->type() & Browser::TYPE_POPUP) |
522 view = new chromeos::PanelBrowserView(browser); | 526 view = new chromeos::PanelBrowserView(browser); |
523 else | 527 else |
524 view = new chromeos::BrowserView(browser); | 528 view = new chromeos::BrowserView(browser); |
525 BrowserFrame::Create(view, browser->profile()); | 529 BrowserFrame::Create(view, browser->profile()); |
526 return view; | 530 return view; |
527 } | 531 } |
OLD | NEW |