| Index: chrome/browser/instant/instant_controller_utils.h
|
| diff --git a/chrome/browser/instant/instant_controller_utils.h b/chrome/browser/instant/instant_controller_utils.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4bd4440553b655a9db3fc0cfda68dd23bbae1a5a
|
| --- /dev/null
|
| +++ b/chrome/browser/instant/instant_controller_utils.h
|
| @@ -0,0 +1,42 @@
|
| +// Copyright 2013 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_CONTROLLER_UTILS_H_
|
| +#define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_UTILS_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/string16.h"
|
| +#include "chrome/browser/instant/instant_commit_type.h"
|
| +#include "chrome/browser/ui/omnibox/omnibox_edit_model.h"
|
| +#include "ui/gfx/native_widget_types.h"
|
| +
|
| +namespace content {
|
| +class WebContents;
|
| +}
|
| +
|
| +class InstantControllerUtils {
|
| + public:
|
| + static gfx::NativeView GetViewGainingFocus(
|
| + gfx::NativeView view_gaining_focus);
|
| +
|
| + // Returns true if |view| is the top-level contents view or a child view in
|
| + // the view hierarchy of |contents|.
|
| + static bool IsViewInContents(gfx::NativeView view,
|
| + content::WebContents* contents);
|
| +
|
| + static bool NormalizeAndStripPrefix(string16* text, const string16& prefix);
|
| +
|
| + static std::string CommitTypeToString(InstantCommitType type);
|
| +
|
| + static std::string FocusStateToString(OmniboxFocusState state);
|
| +
|
| + static std::string FocusChangeReasonToString(OmniboxFocusChangeReason reason);
|
| +
|
| + private:
|
| + DISALLOW_IMPLICIT_CONSTRUCTORS(InstantControllerUtils);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_UTILS_H_
|
|
|