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 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1406 // Some reports seem to show that the focus manager and/or focused view can | 1406 // Some reports seem to show that the focus manager and/or focused view can |
1407 // be garbage at that point, it is not clear why. | 1407 // be garbage at that point, it is not clear why. |
1408 if (!contents->tab_contents()->is_being_destroyed()) | 1408 if (!contents->tab_contents()->is_being_destroyed()) |
1409 contents->view()->StoreFocus(); | 1409 contents->view()->StoreFocus(); |
1410 } | 1410 } |
1411 | 1411 |
1412 void BrowserView::ActiveTabChanged(TabContentsWrapper* old_contents, | 1412 void BrowserView::ActiveTabChanged(TabContentsWrapper* old_contents, |
1413 TabContentsWrapper* new_contents, | 1413 TabContentsWrapper* new_contents, |
1414 int index, | 1414 int index, |
1415 bool user_gesture) { | 1415 bool user_gesture) { |
1416 if (old_contents == new_contents) | |
1417 return; | |
1418 | |
1419 ProcessTabSelected(new_contents, true); | 1416 ProcessTabSelected(new_contents, true); |
1420 } | 1417 } |
1421 | 1418 |
1422 void BrowserView::TabReplacedAt(TabStripModel* tab_strip_model, | 1419 void BrowserView::TabReplacedAt(TabStripModel* tab_strip_model, |
1423 TabContentsWrapper* old_contents, | 1420 TabContentsWrapper* old_contents, |
1424 TabContentsWrapper* new_contents, | 1421 TabContentsWrapper* new_contents, |
1425 int index) { | 1422 int index) { |
1426 if (index != browser_->tabstrip_model()->active_index()) | 1423 if (index != browser_->tabstrip_model()->active_index()) |
1427 return; | 1424 return; |
1428 | 1425 |
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2605 view->GetWidget()->non_client_view()->SetAccessibleName( | 2602 view->GetWidget()->non_client_view()->SetAccessibleName( |
2606 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2603 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
2607 return view; | 2604 return view; |
2608 } | 2605 } |
2609 #endif | 2606 #endif |
2610 | 2607 |
2611 // static | 2608 // static |
2612 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2609 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2613 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2610 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2614 } | 2611 } |
OLD | NEW |