blob: b77742da908f0c1f5722c75afd4b97b0f04eb534 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_INSTANT_INSTANT_LOADER_DELEGATE_H_
#define CHROME_BROWSER_INSTANT_INSTANT_LOADER_DELEGATE_H_
#pragma once
#include "base/string16.h"
namespace gfx {
class Rect;
}
class InstantLoader;
// InstantLoader's delegate. This interface is implemented by InstantController.
class InstantLoaderDelegate {
public:
// Invoked when the loader is ready to be shown.
virtual void ShowInstantLoader(InstantLoader* loader) = 0;
// Invoked when the loader has suggested text.
virtual void SetSuggestedTextFor(InstantLoader* loader,
const string16& text) = 0;
// Returns the bounds of instant.
virtual gfx::Rect GetInstantBounds() = 0;
// Returns true if instant should be committed on mouse up.
virtual bool ShouldCommitInstantOnMouseUp() = 0;
// Invoked when the the loader should be committed.
virtual void CommitInstantLoader(InstantLoader* loader) = 0;
protected:
virtual ~InstantLoaderDelegate() {}
};
#endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_DELEGATE_H_
|