[M47_2526] Chromium upversion to m47_2526 branch
[platform/framework/web/chromium-efl.git] / tizen_src / chromium_impl / content / browser / web_contents / web_contents_impl_efl.h
1 // Copyright (c) 2014 Samsung Electronics. 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 WEB_CONTENTS_IMPL_EFL_H_
6 #define WEB_CONTENTS_IMPL_EFL_H_
7
8 #include "content/browser/web_contents/web_contents_impl.h"
9 #include "content/common/content_export.h"
10
11 namespace content {
12
13 class SiteInstance;
14 class WebContentsEflDelegate;
15
16 class CONTENT_EXPORT WebContentsImplEfl : public WebContentsImpl {
17  public:
18   // See WebContents::Create for a description of these parameters.
19   WebContentsImplEfl(BrowserContext* browser_context,
20                      void* platform_data);
21
22   void CreateNewWindow(
23       SiteInstance* source_site_instance,
24       int route_id,
25       int main_frame_route_id,
26       const ViewHostMsg_CreateWindow_Params& params,
27       SessionStorageNamespace* session_storage_namespace) override;
28
29   void* GetPlatformData() const { return platform_data_; };
30
31   void SetEflDelegate(WebContentsEflDelegate*);
32
33   // Overrides for WebContents
34   WebContents* Clone() override;
35
36   void SetUserAgentOverride(const std::string& override) override;
37
38  private:
39   // Needed to access private WebContentsImplEfl constructor from
40   // WebContents/WebContetnsImpl static Create* functions.
41   friend class WebContentsImpl;
42   friend class WebContents;
43
44   void CancelWindowRequest(
45       int render_process_id,
46       int route_id,
47       int main_frame_route_id);
48
49   void HandleNewWindowRequest(
50       int render_process_id,
51       int route_id,
52       int main_frame_route_id,
53       const ViewHostMsg_CreateWindow_Params& params,
54       SessionStorageNamespace* session_storage_namespace,
55       bool create);
56
57   WebContents* HandleNewWebContentsCreate(
58       int render_process_id,
59       int route_id,
60       int main_frame_route_id,
61       const ViewHostMsg_CreateWindow_Params& params,
62       SessionStorageNamespace* session_storage_namespace,
63       void* platform_data);
64
65   void* platform_data_;
66
67   scoped_ptr<WebContentsEflDelegate> efl_delegate_;
68
69   DISALLOW_COPY_AND_ASSIGN(WebContentsImplEfl);
70 };
71
72 } // namespace content
73
74 #endif