Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / browser / runtime.cc
index 86cf0a6..f039da8 100644 (file)
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/notification_source.h"
 #include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
 #include "content/public/browser/render_view_host.h"
 #include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
-#include "content/public/browser/render_process_host.h"
 #include "grit/xwalk_resources.h"
 #include "ui/base/resource/resource_bundle.h"
 #include "ui/gfx/image/image_skia.h"
@@ -54,9 +53,10 @@ Runtime* Runtime::CreateWithDefaultWindow(
 }
 
 // static
-Runtime* Runtime::Create(
-    RuntimeContext* runtime_context, Observer* observer) {
-  WebContents::CreateParams params(runtime_context, NULL);
+Runtime* Runtime::Create(RuntimeContext* runtime_context,
+                         Observer* observer,
+                         content::SiteInstance* site) {
+  WebContents::CreateParams params(runtime_context, site);
   params.routing_id = MSG_ROUTING_NONE;
   WebContents* web_contents = WebContents::Create(params);
 
@@ -143,7 +143,7 @@ void Runtime::LoadURL(const GURL& url) {
       content::PAGE_TRANSITION_TYPED |
       content::PAGE_TRANSITION_FROM_ADDRESS_BAR);
   web_contents_->GetController().LoadURLWithParams(params);
-  web_contents_->GetView()->Focus();
+  web_contents_->Focus();
 }
 
 void Runtime::Close() {
@@ -282,8 +282,7 @@ void Runtime::EnumerateDirectory(content::WebContents* web_contents,
 #endif
 }
 
-void Runtime::DidUpdateFaviconURL(int32 page_id,
-                                  const std::vector<FaviconURL>& candidates) {
+void Runtime::DidUpdateFaviconURL(const std::vector<FaviconURL>& candidates) {
   DLOG(INFO) << "Candidates: ";
   for (size_t i = 0; i < candidates.size(); ++i)
     DLOG(INFO) << candidates[i].icon_url.spec();