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

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

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/browser/internal_auth.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 if (preview_contents_.get() && is_showing_instant() && 677 if (preview_contents_.get() && is_showing_instant() &&
678 !is_waiting_for_load()) { 678 !is_waiting_for_load()) {
679 // Updating the bounds is rather expensive, and because of the async nature 679 // Updating the bounds is rather expensive, and because of the async nature
680 // of the omnibox the bounds can dance around a bit. Delay the update in 680 // of the omnibox the bounds can dance around a bit. Delay the update in
681 // hopes of things settling down. To avoid hiding results we grow 681 // hopes of things settling down. To avoid hiding results we grow
682 // immediately, but delay shrinking. 682 // immediately, but delay shrinking.
683 update_bounds_timer_.Stop(); 683 update_bounds_timer_.Stop();
684 if (omnibox_bounds_.height() > last_omnibox_bounds_.height()) { 684 if (omnibox_bounds_.height() > last_omnibox_bounds_.height()) {
685 SendBoundsToPage(false); 685 SendBoundsToPage(false);
686 } else { 686 } else {
687 update_bounds_timer_.Start(FROM_HERE, 687 update_bounds_timer_.Start(
688 base::TimeDelta::FromMilliseconds(kUpdateBoundsDelayMS), 688 base::TimeDelta::FromMilliseconds(kUpdateBoundsDelayMS),
689 this, &InstantLoader::ProcessBoundsChange); 689 this, &InstantLoader::ProcessBoundsChange);
690 } 690 }
691 } 691 }
692 } 692 }
693 693
694 bool InstantLoader::IsMouseDownFromActivate() { 694 bool InstantLoader::IsMouseDownFromActivate() {
695 return preview_tab_contents_delegate_.get() && 695 return preview_tab_contents_delegate_.get() &&
696 preview_tab_contents_delegate_->is_mouse_down_from_activate(); 696 preview_tab_contents_delegate_->is_mouse_down_from_activate();
697 } 697 }
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 CommandLine* cl = CommandLine::ForCurrentProcess(); 1033 CommandLine* cl = CommandLine::ForCurrentProcess();
1034 if (cl->HasSwitch(switches::kInstantURL)) 1034 if (cl->HasSwitch(switches::kInstantURL))
1035 instant_url = GURL(cl->GetSwitchValueASCII(switches::kInstantURL)); 1035 instant_url = GURL(cl->GetSwitchValueASCII(switches::kInstantURL));
1036 preview_contents_->controller().LoadURL(instant_url, GURL(), transition_type); 1036 preview_contents_->controller().LoadURL(instant_url, GURL(), transition_type);
1037 RenderViewHost* host = preview_contents_->render_view_host(); 1037 RenderViewHost* host = preview_contents_->render_view_host();
1038 host->Send(new ChromeViewMsg_SearchBoxChange( 1038 host->Send(new ChromeViewMsg_SearchBoxChange(
1039 host->routing_id(), user_text, verbatim, 0, 0)); 1039 host->routing_id(), user_text, verbatim, 0, 0));
1040 frame_load_observer_.reset(new FrameLoadObserver( 1040 frame_load_observer_.reset(new FrameLoadObserver(
1041 this, preview_contents()->tab_contents(), user_text, verbatim)); 1041 this, preview_contents()->tab_contents(), user_text, verbatim));
1042 } 1042 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/browser/internal_auth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698