| 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 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1415 // Some reports seem to show that the focus manager and/or focused view can | 1415 // Some reports seem to show that the focus manager and/or focused view can |
| 1416 // be garbage at that point, it is not clear why. | 1416 // be garbage at that point, it is not clear why. |
| 1417 if (!contents->tab_contents()->is_being_destroyed()) | 1417 if (!contents->tab_contents()->is_being_destroyed()) |
| 1418 contents->view()->StoreFocus(); | 1418 contents->view()->StoreFocus(); |
| 1419 } | 1419 } |
| 1420 | 1420 |
| 1421 void BrowserView::ActiveTabChanged(TabContentsWrapper* old_contents, | 1421 void BrowserView::ActiveTabChanged(TabContentsWrapper* old_contents, |
| 1422 TabContentsWrapper* new_contents, | 1422 TabContentsWrapper* new_contents, |
| 1423 int index, | 1423 int index, |
| 1424 bool user_gesture) { | 1424 bool user_gesture) { |
| 1425 if (old_contents == new_contents) | |
| 1426 return; | |
| 1427 | |
| 1428 ProcessTabSelected(new_contents, true); | 1425 ProcessTabSelected(new_contents, true); |
| 1429 } | 1426 } |
| 1430 | 1427 |
| 1431 void BrowserView::TabReplacedAt(TabStripModel* tab_strip_model, | 1428 void BrowserView::TabReplacedAt(TabStripModel* tab_strip_model, |
| 1432 TabContentsWrapper* old_contents, | 1429 TabContentsWrapper* old_contents, |
| 1433 TabContentsWrapper* new_contents, | 1430 TabContentsWrapper* new_contents, |
| 1434 int index) { | 1431 int index) { |
| 1435 if (index != browser_->tabstrip_model()->active_index()) | 1432 if (index != browser_->tabstrip_model()->active_index()) |
| 1436 return; | 1433 return; |
| 1437 | 1434 |
| (...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2620 view->GetWidget()->non_client_view()->SetAccessibleName( | 2617 view->GetWidget()->non_client_view()->SetAccessibleName( |
| 2621 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2618 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
| 2622 return view; | 2619 return view; |
| 2623 } | 2620 } |
| 2624 #endif | 2621 #endif |
| 2625 | 2622 |
| 2626 // static | 2623 // static |
| 2627 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2624 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
| 2628 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2625 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
| 2629 } | 2626 } |
| OLD | NEW |