OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_UTILS_H_ |
| 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_UTILS_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/string16.h" |
| 12 #include "chrome/browser/instant/instant_commit_type.h" |
| 13 #include "chrome/common/omnibox_types.h" |
| 14 #include "ui/gfx/native_widget_types.h" |
| 15 |
| 16 namespace content { |
| 17 class WebContents; |
| 18 } |
| 19 |
| 20 class InstantControllerUtils { |
| 21 public: |
| 22 static gfx::NativeView GetViewGainingFocus( |
| 23 gfx::NativeView view_gaining_focus); |
| 24 |
| 25 // Returns true if |view| is the top-level contents view or a child view in |
| 26 // the view hierarchy of |contents|. |
| 27 static bool IsViewInContents(gfx::NativeView view, |
| 28 content::WebContents* contents); |
| 29 |
| 30 static bool NormalizeAndStripPrefix(string16* text, const string16& prefix); |
| 31 |
| 32 static std::string CommitTypeToString(InstantCommitType type); |
| 33 |
| 34 static std::string FocusStateToString(OmniboxFocusState state); |
| 35 |
| 36 static std::string FocusChangeReasonToString(OmniboxFocusChangeReason reason); |
| 37 |
| 38 private: |
| 39 DISALLOW_IMPLICIT_CONSTRUCTORS(InstantControllerUtils); |
| 40 }; |
| 41 |
| 42 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_UTILS_H_ |
OLD | NEW |