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 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 } | 1398 } |
1399 | 1399 |
1400 void BrowserView::TabDeselected(TabContentsWrapper* contents) { | 1400 void BrowserView::TabDeselected(TabContentsWrapper* contents) { |
1401 // We do not store the focus when closing the tab to work-around bug 4633. | 1401 // We do not store the focus when closing the tab to work-around bug 4633. |
1402 // Some reports seem to show that the focus manager and/or focused view can | 1402 // Some reports seem to show that the focus manager and/or focused view can |
1403 // be garbage at that point, it is not clear why. | 1403 // be garbage at that point, it is not clear why. |
1404 if (!contents->tab_contents()->is_being_destroyed()) | 1404 if (!contents->tab_contents()->is_being_destroyed()) |
1405 contents->view()->StoreFocus(); | 1405 contents->view()->StoreFocus(); |
1406 } | 1406 } |
1407 | 1407 |
1408 void BrowserView::TabSelectedAt(TabContentsWrapper* old_contents, | 1408 void BrowserView::TabActivatedAt(TabContentsWrapper* old_contents, |
1409 TabContentsWrapper* new_contents, | 1409 TabContentsWrapper* new_contents, |
1410 int index, | 1410 int index, |
1411 bool user_gesture) { | 1411 bool user_gesture) { |
1412 if (old_contents == new_contents) | 1412 if (old_contents == new_contents) |
1413 return; | 1413 return; |
1414 | 1414 |
1415 ProcessTabSelected(new_contents, true); | 1415 ProcessTabSelected(new_contents, true); |
1416 } | 1416 } |
1417 | 1417 |
1418 void BrowserView::TabReplacedAt(TabStripModel* tab_strip_model, | 1418 void BrowserView::TabReplacedAt(TabStripModel* tab_strip_model, |
1419 TabContentsWrapper* old_contents, | 1419 TabContentsWrapper* old_contents, |
1420 TabContentsWrapper* new_contents, | 1420 TabContentsWrapper* new_contents, |
1421 int index) { | 1421 int index) { |
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2593 view->GetWindow()->non_client_view()->SetAccessibleName( | 2593 view->GetWindow()->non_client_view()->SetAccessibleName( |
2594 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2594 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
2595 return view; | 2595 return view; |
2596 } | 2596 } |
2597 #endif | 2597 #endif |
2598 | 2598 |
2599 // static | 2599 // static |
2600 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2600 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2601 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2601 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2602 } | 2602 } |
OLD | NEW |