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

Unified Diff: chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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/ui/webui/omnibox/omnibox_ui_handler.h
diff --git a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h
index 9538110820ae35949e34d56c8cdd6b0d1dea52ec..9cfea3a38c706dab7ff323b790c3c5beb428e476 100644
--- a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h
+++ b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h
@@ -14,7 +14,6 @@
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/ui/webui/mojo_web_ui_handler.h"
#include "chrome/browser/ui/webui/omnibox/omnibox.mojom.h"
-#include "mojo/public/cpp/bindings/remote_ptr.h"
class AutocompleteController;
class Profile;
@@ -24,16 +23,22 @@ class Profile;
// AutocompleteController to OnResultChanged() and passes those results to
// the OmniboxPage.
class OmniboxUIHandler : public AutocompleteControllerDelegate,
- public OmniboxUIHandlerMojo,
+ public mojo::InterfaceImpl<OmniboxUIHandlerMojo>,
public MojoWebUIHandler {
public:
- OmniboxUIHandler(ScopedOmniboxPageHandle handle, Profile* profile);
+ explicit OmniboxUIHandler(Profile* profile);
virtual ~OmniboxUIHandler();
// AutocompleteControllerDelegate overrides:
virtual void OnResultChanged(bool default_match_changed) OVERRIDE;
+ // ErrorHandler overrides:
+ virtual void OnConnectionError() OVERRIDE {
+ // TODO(darin): How should we handle connection error?
+ }
+
// OmniboxUIHandlerMojo overrides:
+ virtual void SetClient(OmniboxPage* page) OVERRIDE;
virtual void StartOmniboxQuery(const mojo::String& input_string,
int32_t cursor_position,
bool prevent_inline_autocomplete,
@@ -50,7 +55,7 @@ class OmniboxUIHandler : public AutocompleteControllerDelegate,
// next query.
void ResetController();
- mojo::RemotePtr<OmniboxPage> page_;
+ OmniboxPage* page_;
// The omnibox AutocompleteController that collects/sorts/dup-
// eliminates the results as they come in.

Powered by Google App Engine
This is Rietveld 408576698