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