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

Unified Diff: chrome/browser/instant/instant_controller_utils.h

Issue 12386019: Instant: Use only one hidden WebContents per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698