| 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/instant/instant_loader.h" | 5 #include "chrome/browser/instant/instant_loader.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 if (preview_contents_->tab_contents()->GetRenderWidgetHostView()) { | 591 if (preview_contents_->tab_contents()->GetRenderWidgetHostView()) { |
| 592 #if defined(OS_MACOSX) | 592 #if defined(OS_MACOSX) |
| 593 preview_contents_->tab_contents()->GetRenderWidgetHostView()-> | 593 preview_contents_->tab_contents()->GetRenderWidgetHostView()-> |
| 594 SetTakesFocusOnlyOnMouseDown(false); | 594 SetTakesFocusOnlyOnMouseDown(false); |
| 595 registrar_.Remove( | 595 registrar_.Remove( |
| 596 this, | 596 this, |
| 597 NotificationType::RENDER_VIEW_HOST_CHANGED, | 597 NotificationType::RENDER_VIEW_HOST_CHANGED, |
| 598 Source<NavigationController>(&preview_contents_->controller())); | 598 Source<NavigationController>(&preview_contents_->controller())); |
| 599 #endif | 599 #endif |
| 600 } | 600 } |
| 601 preview_contents_->set_delegate(NULL); | 601 preview_contents_->tab_contents()->set_delegate(NULL); |
| 602 preview_tab_contents_delegate_->Reset(); | 602 preview_tab_contents_delegate_->Reset(); |
| 603 ready_ = false; | 603 ready_ = false; |
| 604 } | 604 } |
| 605 update_bounds_timer_.Stop(); | 605 update_bounds_timer_.Stop(); |
| 606 return preview_contents_.release(); | 606 return preview_contents_.release(); |
| 607 } | 607 } |
| 608 | 608 |
| 609 bool InstantLoader::ShouldCommitInstantOnMouseUp() { | 609 bool InstantLoader::ShouldCommitInstantOnMouseUp() { |
| 610 return delegate_->ShouldCommitInstantOnMouseUp(); | 610 return delegate_->ShouldCommitInstantOnMouseUp(); |
| 611 } | 611 } |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 Source<NavigationController>(&preview_contents_->controller())); | 770 Source<NavigationController>(&preview_contents_->controller())); |
| 771 #endif | 771 #endif |
| 772 | 772 |
| 773 registrar_.Add( | 773 registrar_.Add( |
| 774 this, | 774 this, |
| 775 NotificationType::NAV_ENTRY_COMMITTED, | 775 NotificationType::NAV_ENTRY_COMMITTED, |
| 776 Source<NavigationController>(&preview_contents_->controller())); | 776 Source<NavigationController>(&preview_contents_->controller())); |
| 777 | 777 |
| 778 preview_contents_->tab_contents()->ShowContents(); | 778 preview_contents_->tab_contents()->ShowContents(); |
| 779 } | 779 } |
| OLD | NEW |