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

Side by Side Diff: chrome/browser/instant/instant_controller.h

Issue 8370020: Add a new field trial for Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed @sky's comments Created 9 years, 1 month 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) 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 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // false a commit does not result in committing the last url passed to update. 101 // false a commit does not result in committing the last url passed to update.
102 // A return value of false happens if we're in the process of determining if 102 // A return value of false happens if we're in the process of determining if
103 // the page supports instant. 103 // the page supports instant.
104 bool IsCurrent(); 104 bool IsCurrent();
105 105
106 // Returns true if the caller should proceed with committing the preview. A 106 // Returns true if the caller should proceed with committing the preview. A
107 // return value of false means that there is no valid preview to commit. This 107 // return value of false means that there is no valid preview to commit. This
108 // is used by Browser, when the user presses <Enter>, to decide whether to 108 // is used by Browser, when the user presses <Enter>, to decide whether to
109 // load the omnibox contents through Instant or otherwise. This is needed 109 // load the omnibox contents through Instant or otherwise. This is needed
110 // because calls to |Update| don't necessarily result in a preview being 110 // because calls to |Update| don't necessarily result in a preview being
111 // shown, such as in the HIDDEN field trial. 111 // shown, such as in the HIDDEN and SILENT field trials.
112 bool PrepareForCommit(); 112 bool PrepareForCommit();
113 113
114 // Invoked when the user does some gesture that should trigger making the 114 // Invoked when the user does some gesture that should trigger making the
115 // current previewed page the permanent page. Returns the TCW that contains 115 // current previewed page the permanent page. Returns the TCW that contains
116 // the committed preview. 116 // the committed preview.
117 TabContentsWrapper* CommitCurrentPreview(InstantCommitType type); 117 TabContentsWrapper* CommitCurrentPreview(InstantCommitType type);
118 118
119 // Sets InstantController so that when the mouse is released the preview is 119 // Sets InstantController so that when the mouse is released the preview is
120 // committed. 120 // committed.
121 void SetCommitOnMouseUp(); 121 void SetCommitOnMouseUp();
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // The URL of the most recent match passed to |Update|. 256 // The URL of the most recent match passed to |Update|.
257 GURL last_url_; 257 GURL last_url_;
258 258
259 // The most recent user_text passed to |Update|. 259 // The most recent user_text passed to |Update|.
260 string16 last_user_text_; 260 string16 last_user_text_;
261 261
262 DISALLOW_COPY_AND_ASSIGN(InstantController); 262 DISALLOW_COPY_AND_ASSIGN(InstantController);
263 }; 263 };
264 264
265 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 265 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_browsertest.cc ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698