| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/views/frame/browser_view.h" | 5 #include "chrome/browser/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "chrome/app/chrome_dll_resource.h" | 10 #include "chrome/app/chrome_dll_resource.h" |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 LocationBarView* location_bar = toolbar_->GetLocationBarView(); | 730 LocationBarView* location_bar = toolbar_->GetLocationBarView(); |
| 731 if (location_bar->IsFocusable()) { | 731 if (location_bar->IsFocusable()) { |
| 732 location_bar->FocusLocation(); | 732 location_bar->FocusLocation(); |
| 733 } else { | 733 } else { |
| 734 views::FocusManager* focus_manager = GetFocusManager(); | 734 views::FocusManager* focus_manager = GetFocusManager(); |
| 735 DCHECK(focus_manager); | 735 DCHECK(focus_manager); |
| 736 focus_manager->ClearFocus(); | 736 focus_manager->ClearFocus(); |
| 737 } | 737 } |
| 738 } | 738 } |
| 739 | 739 |
| 740 void BrowserView::UpdateStopGoState(bool is_loading) { | 740 void BrowserView::UpdateStopGoState(bool is_loading, bool force) { |
| 741 toolbar_->GetGoButton()->ChangeMode( | 741 toolbar_->GetGoButton()->ChangeMode( |
| 742 is_loading ? GoButton::MODE_STOP : GoButton::MODE_GO); | 742 is_loading ? GoButton::MODE_STOP : GoButton::MODE_GO, force); |
| 743 } | 743 } |
| 744 | 744 |
| 745 void BrowserView::UpdateToolbar(TabContents* contents, | 745 void BrowserView::UpdateToolbar(TabContents* contents, |
| 746 bool should_restore_state) { | 746 bool should_restore_state) { |
| 747 toolbar_->Update(contents, should_restore_state); | 747 toolbar_->Update(contents, should_restore_state); |
| 748 } | 748 } |
| 749 | 749 |
| 750 void BrowserView::FocusToolbar() { | 750 void BrowserView::FocusToolbar() { |
| 751 // Do not restore the button that previously had accessibility focus, if | 751 // Do not restore the button that previously had accessibility focus, if |
| 752 // focus is set by using the toolbar focus keyboard shortcut. | 752 // focus is set by using the toolbar focus keyboard shortcut. |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 1679 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 1680 BrowserView* browser_view = new BrowserView(browser); | 1680 BrowserView* browser_view = new BrowserView(browser); |
| 1681 (new BrowserFrame(browser_view))->Init(); | 1681 (new BrowserFrame(browser_view))->Init(); |
| 1682 return browser_view; | 1682 return browser_view; |
| 1683 } | 1683 } |
| 1684 | 1684 |
| 1685 // static | 1685 // static |
| 1686 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 1686 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
| 1687 return new FindBarWin(static_cast<BrowserView*>(browser->window())); | 1687 return new FindBarWin(static_cast<BrowserView*>(browser->window())); |
| 1688 } | 1688 } |
| OLD | NEW |