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_UI_OMNIBOX_OMNIBOX_CURRENT_PAGE_DELEGATE_IMPL_H_
6#define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CURRENT_PAGE_DELEGATE_IMPL_H_
7
8#include "base/compiler_specific.h"
9#include "chrome/browser/ui/omnibox/omnibox_current_page_delegate.h"
10
11class OmniboxEditController;
12class Profile;
13
14class OmniboxCurrentPageDelegateImpl : public OmniboxCurrentPageDelegate {
15 public:
16  explicit OmniboxCurrentPageDelegateImpl(OmniboxEditController* controller,
17                                          Profile* profile);
18  virtual ~OmniboxCurrentPageDelegateImpl();
19
20  // OmniboxCurrentPageDelegate.
21  virtual bool CurrentPageExists() const OVERRIDE;
22  virtual const GURL& GetURL() const OVERRIDE;
23  virtual bool IsInstantNTP() const OVERRIDE;
24  virtual bool IsSearchResultsPage() const OVERRIDE;
25  virtual bool IsLoading() const OVERRIDE;
26  virtual content::NavigationController&
27      GetNavigationController() const OVERRIDE;
28  virtual const SessionID& GetSessionID() const OVERRIDE;
29  virtual bool ProcessExtensionKeyword(
30      TemplateURL* template_url,
31      const AutocompleteMatch& match,
32      WindowOpenDisposition disposition) OVERRIDE;
33  virtual void OnInputStateChanged() OVERRIDE;
34  virtual void OnFocusChanged(OmniboxFocusState state,
35                              OmniboxFocusChangeReason reason) OVERRIDE;
36  virtual void DoPrerender(const AutocompleteMatch& match) OVERRIDE;
37  virtual void SetSuggestionToPrefetch(
38      const InstantSuggestion& suggestion) OVERRIDE;
39
40 private:
41  OmniboxEditController* controller_;
42  Profile* profile_;
43
44  DISALLOW_COPY_AND_ASSIGN(OmniboxCurrentPageDelegateImpl);
45};
46
47#endif  // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CURRENT_PAGE_DELEGATE_IMPL_H_
48