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

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

Issue 8298005: Fixes bug in instant where we would end up incorrectly using the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweak Created 9 years, 2 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/ui/browser.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 #ifndef CHROME_BROWSER_INSTANT_INSTANT_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_DELEGATE_H_
6 #define CHROME_BROWSER_INSTANT_INSTANT_DELEGATE_H_ 6 #define CHROME_BROWSER_INSTANT_INSTANT_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "chrome/common/instant_types.h" 10 #include "chrome/common/instant_types.h"
11 11
12 class TabContentsWrapper; 12 class TabContentsWrapper;
13 13
14 namespace gfx { 14 namespace gfx {
15 class Rect; 15 class Rect;
16 } 16 }
17 17
18 // InstantController's delegate. Normally the Browser implements this. See 18 // InstantController's delegate. Normally the Browser implements this. See
19 // InstantController for details. 19 // InstantController for details.
20 class InstantDelegate { 20 class InstantDelegate {
21 public: 21 public:
22 // Invoked when the instant TabContents should be shown. 22 // Invoked when the instant TabContents should be shown.
23 virtual void ShowInstant(TabContentsWrapper* preview_contents) = 0; 23 virtual void ShowInstant(TabContentsWrapper* preview_contents) = 0;
24 24
25 // Invoked when the instant TabContents should be hidden. Instant still may be 25 // Invoked when the instant TabContents should be hidden.
26 // active at the time this is invoked. Use |is_active()| to determine if
27 // instant is still active.
28 virtual void HideInstant() = 0; 26 virtual void HideInstant() = 0;
29 27
30 // Invoked when the user does something that should result in the preview 28 // Invoked when the user does something that should result in the preview
31 // TabContents becoming the active TabContents. The delegate takes ownership 29 // TabContents becoming the active TabContents. The delegate takes ownership
32 // of the supplied TabContents. 30 // of the supplied TabContents.
33 virtual void CommitInstant(TabContentsWrapper* preview_contents) = 0; 31 virtual void CommitInstant(TabContentsWrapper* preview_contents) = 0;
34 32
35 // Invoked when the suggested text is to change to |text|. 33 // Invoked when the suggested text is to change to |text|.
36 virtual void SetSuggestedText(const string16& text, 34 virtual void SetSuggestedText(const string16& text,
37 InstantCompleteBehavior behavior) = 0; 35 InstantCompleteBehavior behavior) = 0;
38 36
39 // Returns the bounds instant will be placed at in screen coordinates. 37 // Returns the bounds instant will be placed at in screen coordinates.
40 virtual gfx::Rect GetInstantBounds() = 0; 38 virtual gfx::Rect GetInstantBounds() = 0;
41 39
42 protected: 40 protected:
43 virtual ~InstantDelegate() {} 41 virtual ~InstantDelegate() {}
44 }; 42 };
45 43
46 #endif // CHROME_BROWSER_INSTANT_INSTANT_DELEGATE_H_ 44 #endif // CHROME_BROWSER_INSTANT_INSTANT_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698