Upstream version 6.35.131.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / renderer / android / xwalk_render_process_observer.h
1 // Copyright (c) 2012 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 XWALK_RUNTIME_RENDERER_ANDROID_XWALK_RENDER_PROCESS_OBSERVER_H_
6 #define XWALK_RUNTIME_RENDERER_ANDROID_XWALK_RENDER_PROCESS_OBSERVER_H_
7
8 #include <string>
9
10 #include "content/public/renderer/render_process_observer.h"
11
12 #include "base/compiler_specific.h"
13
14 namespace xwalk {
15
16 // A RenderProcessObserver implementation used for handling XWalkView
17 // specific render-process wide IPC messages.
18 class XWalkRenderProcessObserver : public content::RenderProcessObserver {
19  public:
20   XWalkRenderProcessObserver();
21   virtual ~XWalkRenderProcessObserver();
22
23   // content::RenderProcessObserver implementation.
24   virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
25   virtual void WebKitInitialized() OVERRIDE;
26
27  private:
28   void OnSetJsOnlineProperty(bool network_up);
29   void OnClearCache();
30   void OnSetOriginAccessWhitelist(std::string base_url,
31                                   std::string match_patterns);
32
33   bool webkit_initialized_;
34 };
35
36 }  // namespace xwalk
37
38 #endif  // XWALK_RUNTIME_RENDERER_ANDROID_XWALK_RENDER_PROCESS_OBSERVER_H_