Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chrome / renderer / chrome_render_frame_observer.h
blobf90ead0159684b111059d40bfc5466b89a5f1a43
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.
5 #ifndef CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_
6 #define CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_
8 #include "base/basictypes.h"
9 #include "content/public/renderer/render_frame_observer.h"
11 class GURL;
13 namespace gfx {
14 class Size;
17 // This class holds the Chrome specific parts of RenderFrame, and has the same
18 // lifetime.
19 class ChromeRenderFrameObserver : public content::RenderFrameObserver {
20 public:
21 explicit ChromeRenderFrameObserver(content::RenderFrame* render_frame);
22 ~ChromeRenderFrameObserver() override;
24 private:
25 // RenderFrameObserver implementation.
26 bool OnMessageReceived(const IPC::Message& message) override;
27 void DidFinishDocumentLoad() override;
29 // IPC handlers
30 void OnSetIsPrerendering(bool is_prerendering);
31 void OnRequestReloadImageForContextNode();
32 void OnRequestThumbnailForContextNode(
33 int thumbnail_min_area_pixels,
34 const gfx::Size& thumbnail_max_size_pixels);
35 void OnPrintNodeUnderContextMenu();
36 void OnAppBannerPromptRequest(int request_id,
37 const std::string& platform);
38 void OnAppBannerDebugMessageRequest(const std::string& message);
40 DISALLOW_COPY_AND_ASSIGN(ChromeRenderFrameObserver);
43 #endif // CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_