| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/tab_contents/tab_contents.h" | 5 #include "chrome/browser/tab_contents/tab_contents.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 } | 593 } |
| 594 | 594 |
| 595 void TabContents::NotifyNavigationStateChanged(unsigned changed_flags) { | 595 void TabContents::NotifyNavigationStateChanged(unsigned changed_flags) { |
| 596 if (delegate_) | 596 if (delegate_) |
| 597 delegate_->NavigationStateChanged(this, changed_flags); | 597 delegate_->NavigationStateChanged(this, changed_flags); |
| 598 } | 598 } |
| 599 | 599 |
| 600 void TabContents::DidBecomeSelected() { | 600 void TabContents::DidBecomeSelected() { |
| 601 controller_.SetActive(true); | 601 controller_.SetActive(true); |
| 602 | 602 |
| 603 if (render_widget_host_view()) | 603 if (render_widget_host_view()) { |
| 604 render_widget_host_view()->DidBecomeSelected(); | 604 render_widget_host_view()->DidBecomeSelected(); |
| 605 #if defined(OS_MACOSX) |
| 606 render_widget_host_view()->SetActive(true); |
| 607 #endif |
| 608 } |
| 605 | 609 |
| 606 // If pid() is -1, that means the RenderProcessHost still hasn't been | 610 // If pid() is -1, that means the RenderProcessHost still hasn't been |
| 607 // initialized. It'll register with CacheManagerHost when it is. | 611 // initialized. It'll register with CacheManagerHost when it is. |
| 608 if (process()->pid() != -1) | 612 if (process()->pid() != -1) |
| 609 WebCacheManager::GetInstance()->ObserveActivity(process()->pid()); | 613 WebCacheManager::GetInstance()->ObserveActivity(process()->pid()); |
| 610 } | 614 } |
| 611 | 615 |
| 612 void TabContents::WasHidden() { | 616 void TabContents::WasHidden() { |
| 613 if (!capturing_contents()) { | 617 if (!capturing_contents()) { |
| 614 // |render_view_host()| can be NULL if the user middle clicks a link to open | 618 // |render_view_host()| can be NULL if the user middle clicks a link to open |
| (...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2377 NavigationController::LoadCommittedDetails& committed_details = | 2381 NavigationController::LoadCommittedDetails& committed_details = |
| 2378 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); | 2382 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); |
| 2379 ExpireInfoBars(committed_details); | 2383 ExpireInfoBars(committed_details); |
| 2380 break; | 2384 break; |
| 2381 } | 2385 } |
| 2382 | 2386 |
| 2383 default: | 2387 default: |
| 2384 NOTREACHED(); | 2388 NOTREACHED(); |
| 2385 } | 2389 } |
| 2386 } | 2390 } |
| OLD | NEW |