Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: chrome/browser/instant/instant_loader.cc

Issue 10107002: TabContents -> WebContentsImpl, part 18. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 http_status_ok_(true), 634 http_status_ok_(true),
635 last_transition_type_(content::PAGE_TRANSITION_LINK), 635 last_transition_type_(content::PAGE_TRANSITION_LINK),
636 verbatim_(false), 636 verbatim_(false),
637 needs_reload_(false), 637 needs_reload_(false),
638 group_(group) { 638 group_(group) {
639 } 639 }
640 640
641 InstantLoader::~InstantLoader() { 641 InstantLoader::~InstantLoader() {
642 registrar_.RemoveAll(); 642 registrar_.RemoveAll();
643 643
644 // Delete the TabContents before the delegate as the TabContents holds a 644 // Delete the TabContentsWrapper before the delegate as the TabContentsWrapper
645 // reference to the delegate. 645 // holds a reference to the delegate.
646 if (preview_contents()) 646 if (preview_contents())
647 AddPreviewUsageForHistogram(template_url_id_, PREVIEW_DELETED, group_); 647 AddPreviewUsageForHistogram(template_url_id_, PREVIEW_DELETED, group_);
648 preview_contents_.reset(); 648 preview_contents_.reset();
649 } 649 }
650 650
651 bool InstantLoader::Update(TabContentsWrapper* tab_contents, 651 bool InstantLoader::Update(TabContentsWrapper* tab_contents,
652 const TemplateURL* template_url, 652 const TemplateURL* template_url,
653 const GURL& url, 653 const GURL& url,
654 content::PageTransition transition_type, 654 content::PageTransition transition_type,
655 const string16& user_text, 655 const string16& user_text,
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 host->Send(new ChromeViewMsg_SearchBoxResize( 1149 host->Send(new ChromeViewMsg_SearchBoxResize(
1150 host->GetRoutingID(), GetOmniboxBoundsInTermsOfPreview())); 1150 host->GetRoutingID(), GetOmniboxBoundsInTermsOfPreview()));
1151 } else { 1151 } else {
1152 host->Send(new ChromeViewMsg_SearchBoxChange( 1152 host->Send(new ChromeViewMsg_SearchBoxChange(
1153 host->GetRoutingID(), user_text, verbatim, 0, 0)); 1153 host->GetRoutingID(), user_text, verbatim, 0, 0));
1154 } 1154 }
1155 1155
1156 frame_load_observer_.reset(new FrameLoadObserver( 1156 frame_load_observer_.reset(new FrameLoadObserver(
1157 this, preview_contents()->web_contents(), user_text, verbatim)); 1157 this, preview_contents()->web_contents(), user_text, verbatim));
1158 } 1158 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_loader.h ('k') | chrome/browser/instant/instant_loader_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698