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

Side by Side Diff: chrome/browser/renderer_host/chrome_render_view_host_observer.h

Issue 21323003: The UI part of search-by-image search. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: add menu string resource Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_VIEW_HOST_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_VIEW_HOST_OBSERVER_H_
6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_VIEW_HOST_OBSERVER_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_VIEW_HOST_OBSERVER_H_
7 7
8 #include <string>
9
8 #include "content/public/browser/render_view_host_observer.h" 10 #include "content/public/browser/render_view_host_observer.h"
9 11
10 class Profile; 12 class Profile;
13 class SkBitmap;
11 14
12 namespace chrome_browser_net { 15 namespace chrome_browser_net {
13 class Predictor; 16 class Predictor;
14 } 17 }
15 18
16 namespace extensions { 19 namespace extensions {
17 class Extension; 20 class Extension;
18 } 21 }
19 22
20 // This class holds the Chrome specific parts of RenderViewHost, and has the 23 // This class holds the Chrome specific parts of RenderViewHost, and has the
21 // same lifetime. 24 // same lifetime.
22 class ChromeRenderViewHostObserver : public content::RenderViewHostObserver { 25 class ChromeRenderViewHostObserver : public content::RenderViewHostObserver {
23 public: 26 public:
24 ChromeRenderViewHostObserver(content::RenderViewHost* render_view_host, 27 ChromeRenderViewHostObserver(content::RenderViewHost* render_view_host,
25 chrome_browser_net::Predictor* predictor); 28 chrome_browser_net::Predictor* predictor);
26 virtual ~ChromeRenderViewHostObserver(); 29 virtual ~ChromeRenderViewHostObserver();
27 30
28 // content::RenderViewHostObserver overrides. 31 // content::RenderViewHostObserver overrides.
29 virtual void RenderViewHostInitialized() OVERRIDE; 32 virtual void RenderViewHostInitialized() OVERRIDE;
30 virtual void RenderViewHostDestroyed(content::RenderViewHost* rvh) OVERRIDE; 33 virtual void RenderViewHostDestroyed(content::RenderViewHost* rvh) OVERRIDE;
31 virtual void Navigate(const GURL& url) OVERRIDE; 34 virtual void Navigate(const GURL& url) OVERRIDE;
32 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 35 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
33 36
34 private: 37 private:
35 // Does extension-specific initialization when a new renderer process is 38 // Does extension-specific initialization when a new renderer process is
36 // created by a RenderViewHost. 39 // created by a RenderViewHost.
37 void InitRenderViewForExtensions(); 40 void InitRenderViewForExtensions();
38 // Gets the extension or app (if any) that is associated with the RVH. 41 // Gets the extension or app (if any) that is associated with the RVH.
39 const extensions::Extension* GetExtension(); 42 const extensions::Extension* GetExtension();
40 // Cleans up when a RenderViewHost is removed, or on destruction. 43 // Cleans up when a RenderViewHost is removed, or on destruction.
41 void RemoveRenderViewHostForExtensions(content::RenderViewHost* rvh); 44 void RemoveRenderViewHostForExtensions(content::RenderViewHost* rvh);
42 void OnFocusedNodeTouched(bool editable); 45 void OnFocusedNodeTouched(bool editable);
46 void OnGetImageThumbnail(const SkBitmap& bitmap);
Avi (use Gerrit) 2013/08/01 05:33:03 Needs a comment.
Johnny(Jianning) Ding 2013/08/01 17:56:57 Done.
43 47
44 Profile* profile_; 48 Profile* profile_;
45 chrome_browser_net::Predictor* predictor_; 49 chrome_browser_net::Predictor* predictor_;
46 50
47 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewHostObserver); 51 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewHostObserver);
48 }; 52 };
49 53
50 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_VIEW_HOST_OBSERVER_H_ 54 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_VIEW_HOST_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698