Fix build break
[chromium-blink-merge.git] / chrome / browser / renderer_host / chrome_render_view_host_observer.h
blobaf6a6992d51e029c7a88f7750c0be9f1b519d72d
1 // Copyright (c) 2011 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.
5 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_VIEW_HOST_OBSERVER_H_
6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_VIEW_HOST_OBSERVER_H_
8 #include "content/public/browser/render_view_host_observer.h"
10 class Profile;
12 namespace chrome_browser_net {
13 class Predictor;
16 namespace extensions {
17 class Extension;
20 // This class holds the Chrome specific parts of RenderViewHost, and has the
21 // same lifetime.
22 class ChromeRenderViewHostObserver : public content::RenderViewHostObserver {
23 public:
24 ChromeRenderViewHostObserver(content::RenderViewHost* render_view_host,
25 chrome_browser_net::Predictor* predictor);
26 virtual ~ChromeRenderViewHostObserver();
28 // content::RenderViewHostObserver overrides.
29 virtual void RenderViewHostInitialized() OVERRIDE;
30 virtual void RenderViewHostDestroyed(content::RenderViewHost* rvh) OVERRIDE;
31 virtual void Navigate(const GURL& url) OVERRIDE;
32 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
34 private:
35 // Does extension-specific initialization when a new renderer process is
36 // created by a RenderViewHost.
37 void InitRenderViewForExtensions();
38 // Gets the extension or app (if any) that is associated with the RVH.
39 const extensions::Extension* GetExtension();
40 // Cleans up when a RenderViewHost is removed, or on destruction.
41 void RemoveRenderViewHostForExtensions(content::RenderViewHost* rvh);
42 void OnFocusedNodeTouched(bool editable);
44 Profile* profile_;
45 chrome_browser_net::Predictor* predictor_;
47 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewHostObserver);
50 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_VIEW_HOST_OBSERVER_H_