| Index: chrome/renderer/searchbox.h
|
| diff --git a/chrome/renderer/searchbox.h b/chrome/renderer/searchbox.h
|
| index 9f3c10443effe2d2ec45613c3615ac61c2d03865..844787068ed4d29926adb1e40e256d71fae00a1b 100644
|
| --- a/chrome/renderer/searchbox.h
|
| +++ b/chrome/renderer/searchbox.h
|
| @@ -1,19 +1,27 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 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_RENDERER_SEARCHBOX_H_
|
| #define CHROME_RENDERER_SEARCHBOX_H_
|
|
|
| -#include <string>
|
| #include <vector>
|
|
|
| +#include "base/basictypes.h"
|
| #include "base/string16.h"
|
| #include "chrome/common/instant_types.h"
|
| #include "content/public/renderer/render_view_observer.h"
|
| #include "content/public/renderer/render_view_observer_tracker.h"
|
| #include "ui/gfx/rect.h"
|
|
|
| +namespace content {
|
| +class RenderView;
|
| +}
|
| +
|
| +namespace IPC {
|
| +class Message;
|
| +}
|
| +
|
| class SearchBox : public content::RenderViewObserver,
|
| public content::RenderViewObserverTracker<SearchBox> {
|
| public:
|
| @@ -21,13 +29,13 @@ class SearchBox : public content::RenderViewObserver,
|
| virtual ~SearchBox();
|
|
|
| // Sends ViewHostMsg_SetSuggestions to the browser.
|
| - void SetSuggestions(const std::vector<std::string>& suggestions,
|
| + void SetSuggestions(const std::vector<string16>& suggestions,
|
| InstantCompleteBehavior behavior);
|
|
|
| const string16& value() const { return value_; }
|
| bool verbatim() const { return verbatim_; }
|
| - uint32 selection_start() const { return selection_start_; }
|
| - uint32 selection_end() const { return selection_end_; }
|
| + size_t selection_start() const { return selection_start_; }
|
| + size_t selection_end() const { return selection_end_; }
|
| gfx::Rect GetRect();
|
|
|
| private:
|
| @@ -36,23 +44,20 @@ class SearchBox : public content::RenderViewObserver,
|
|
|
| void OnChange(const string16& value,
|
| bool verbatim,
|
| - int selection_start,
|
| - int selection_end);
|
| - void OnSubmit(const string16& value, bool verbatim);
|
| - void OnCancel();
|
| + size_t selection_start,
|
| + size_t selection_end);
|
| + void OnSubmit(const string16& value);
|
| + void OnCancel(const string16& value);
|
| void OnResize(const gfx::Rect& bounds);
|
| - void OnDetermineIfPageSupportsInstant(const string16& value,
|
| - bool verbatim,
|
| - int selection_start,
|
| - int selection_end);
|
| + void OnDetermineIfPageSupportsInstant();
|
|
|
| // Sets the searchbox values to their initial value.
|
| void Reset();
|
|
|
| string16 value_;
|
| bool verbatim_;
|
| - uint32 selection_start_;
|
| - uint32 selection_end_;
|
| + size_t selection_start_;
|
| + size_t selection_end_;
|
| gfx::Rect rect_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(SearchBox);
|
|
|