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 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 | 448 |
449 gfx::NativeWindow BrowserView::GetNativeWindow() const { | 449 gfx::NativeWindow BrowserView::GetNativeWindow() const { |
450 return GetWindow()->GetNativeWindow(); | 450 return GetWindow()->GetNativeWindow(); |
451 } | 451 } |
452 | 452 |
453 bool BrowserView::ShouldOpenButtonOptions( | 453 bool BrowserView::ShouldOpenButtonOptions( |
454 const views::View* button_view) const { | 454 const views::View* button_view) const { |
455 return true; | 455 return true; |
456 } | 456 } |
457 | 457 |
458 void BrowserView::ExecuteBrowserCommand(int id) const { | |
459 browser()->ExecuteCommand(id); | |
460 } | |
461 | |
462 void BrowserView::OpenButtonOptions(const views::View* button_view) const { | 458 void BrowserView::OpenButtonOptions(const views::View* button_view) const { |
463 if (button_view == status_area_->network_view()) { | 459 if (button_view == status_area_->network_view()) { |
464 browser()->OpenInternetOptionsDialog(); | 460 browser()->OpenInternetOptionsDialog(); |
465 } else if (button_view == status_area_->language_view()) { | 461 } else if (button_view == status_area_->language_view()) { |
466 LanguageConfigView::Show(GetProfile(), | 462 LanguageConfigView::Show(GetProfile(), |
467 frame()->GetWindow()->GetNativeWindow()); | 463 frame()->GetWindow()->GetNativeWindow()); |
468 } else { | 464 } else { |
469 browser()->OpenSystemOptionsDialog(); | 465 browser()->OpenSystemOptionsDialog(); |
470 } | 466 } |
471 } | 467 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 506 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
511 // Create a browser view for chromeos. | 507 // Create a browser view for chromeos. |
512 BrowserView* view; | 508 BrowserView* view; |
513 if (browser->type() & Browser::TYPE_POPUP) | 509 if (browser->type() & Browser::TYPE_POPUP) |
514 view = new chromeos::PanelBrowserView(browser); | 510 view = new chromeos::PanelBrowserView(browser); |
515 else | 511 else |
516 view = new chromeos::BrowserView(browser); | 512 view = new chromeos::BrowserView(browser); |
517 BrowserFrame::Create(view, browser->profile()); | 513 BrowserFrame::Create(view, browser->profile()); |
518 return view; | 514 return view; |
519 } | 515 } |
OLD | NEW |