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/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
6 | 6 |
7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1400 } | 1400 } |
1401 | 1401 |
1402 void BrowserView::TabDeselected(TabContentsWrapper* contents) { | 1402 void BrowserView::TabDeselected(TabContentsWrapper* contents) { |
1403 // We do not store the focus when closing the tab to work-around bug 4633. | 1403 // We do not store the focus when closing the tab to work-around bug 4633. |
1404 // Some reports seem to show that the focus manager and/or focused view can | 1404 // Some reports seem to show that the focus manager and/or focused view can |
1405 // be garbage at that point, it is not clear why. | 1405 // be garbage at that point, it is not clear why. |
1406 if (!contents->tab_contents()->is_being_destroyed()) | 1406 if (!contents->tab_contents()->is_being_destroyed()) |
1407 contents->view()->StoreFocus(); | 1407 contents->view()->StoreFocus(); |
1408 } | 1408 } |
1409 | 1409 |
1410 void BrowserView::TabSelectedAt(TabContentsWrapper* old_contents, | 1410 void BrowserView::ActiveTabChanged(TabContentsWrapper* old_contents, |
1411 TabContentsWrapper* new_contents, | 1411 TabContentsWrapper* new_contents, |
1412 int index, | 1412 int index, |
1413 bool user_gesture) { | 1413 bool user_gesture) { |
1414 if (old_contents == new_contents) | 1414 if (old_contents == new_contents) |
1415 return; | 1415 return; |
1416 | 1416 |
1417 ProcessTabSelected(new_contents, true); | 1417 ProcessTabSelected(new_contents, true); |
1418 } | 1418 } |
1419 | 1419 |
1420 void BrowserView::TabReplacedAt(TabStripModel* tab_strip_model, | 1420 void BrowserView::TabReplacedAt(TabStripModel* tab_strip_model, |
1421 TabContentsWrapper* old_contents, | 1421 TabContentsWrapper* old_contents, |
1422 TabContentsWrapper* new_contents, | 1422 TabContentsWrapper* new_contents, |
1423 int index) { | 1423 int index) { |
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2601 view->GetWindow()->non_client_view()->SetAccessibleName( | 2601 view->GetWindow()->non_client_view()->SetAccessibleName( |
2602 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2602 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
2603 return view; | 2603 return view; |
2604 } | 2604 } |
2605 #endif | 2605 #endif |
2606 | 2606 |
2607 // static | 2607 // static |
2608 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2608 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2609 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2609 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2610 } | 2610 } |
OLD | NEW |