| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ | 5 #ifndef CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ |
| 6 #define CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ | 6 #define CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "content/public/renderer/render_frame_observer.h" | 9 #include "content/public/renderer/render_frame_observer.h" |
| 10 | 10 |
| 11 namespace gfx { | 11 namespace gfx { |
| 12 class Size; | 12 class Size; |
| 13 } | 13 } |
| 14 | 14 |
| 15 // This class holds the Chrome specific parts of RenderFrame, and has the same | 15 // This class holds the Chrome specific parts of RenderFrame, and has the same |
| 16 // lifetime. | 16 // lifetime. |
| 17 class ChromeRenderFrameObserver : public content::RenderFrameObserver { | 17 class ChromeRenderFrameObserver : public content::RenderFrameObserver { |
| 18 public: | 18 public: |
| 19 explicit ChromeRenderFrameObserver(content::RenderFrame* render_frame); | 19 explicit ChromeRenderFrameObserver(content::RenderFrame* render_frame); |
| 20 virtual ~ChromeRenderFrameObserver(); | 20 virtual ~ChromeRenderFrameObserver(); |
| 21 | 21 |
| 22 private: | 22 private: |
| 23 // RenderFrameObserver implementation. | 23 // RenderFrameObserver implementation. |
| 24 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 24 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 25 virtual void DidChangeName(const base::string16& name) OVERRIDE; | 25 virtual void DidChangeName(const base::string16& name) OVERRIDE; |
| 26 virtual void DetailedConsoleMessageAdded(const base::string16& message, | |
| 27 const base::string16& source, | |
| 28 const base::string16& stack_trace, | |
| 29 int32 line_number, | |
| 30 int32 severity_level) OVERRIDE; | |
| 31 | 26 |
| 32 // IPC handlers | 27 // IPC handlers |
| 33 void OnSetIsPrerendering(bool is_prerendering); | 28 void OnSetIsPrerendering(bool is_prerendering); |
| 34 void OnRequestThumbnailForContextNode( | 29 void OnRequestThumbnailForContextNode( |
| 35 int thumbnail_min_area_pixels, | 30 int thumbnail_min_area_pixels, |
| 36 const gfx::Size& thumbnail_max_size_pixels); | 31 const gfx::Size& thumbnail_max_size_pixels); |
| 37 void OnPrintNodeUnderContextMenu(); | 32 void OnPrintNodeUnderContextMenu(); |
| 38 | 33 |
| 39 DISALLOW_COPY_AND_ASSIGN(ChromeRenderFrameObserver); | 34 DISALLOW_COPY_AND_ASSIGN(ChromeRenderFrameObserver); |
| 40 }; | 35 }; |
| 41 | 36 |
| 42 #endif // CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ | 37 #endif // CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ |
| OLD | NEW |