Fix API changes

This commit is contained in:
Cheng Zhao 2015-09-02 15:16:49 +08:00
parent 1db843244d
commit 45491ca7ab
21 changed files with 81 additions and 74 deletions

View file

@ -56,17 +56,9 @@ void PepperSharedMemoryMessageFilter::OnHostMsgCreateSharedMemory(
->GetVarTracker()
->TrackSharedMemoryHandle(instance, host_shm_handle, size);
base::PlatformFile host_handle =
#if defined(OS_WIN)
host_shm_handle;
#elif defined(OS_POSIX)
host_shm_handle.fd;
#else
#error Not implemented.
#endif
// We set auto_close to false since we need our file descriptor to
// actually be duplicated on linux. The shared memory destructor will
// close the original handle for us.
plugin_handle->set_shmem(host_->ShareHandleWithRemote(host_handle, false),
size);
plugin_handle->set_shmem(
host_->ShareSharedMemoryHandleWithRemote(host_shm_handle), size);
}

View file

@ -427,9 +427,10 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
// blink::WebFrameClient override:
virtual blink::WebFrame* createChildFrame(
blink::WebLocalFrame* parent,
blink::WebTreeScopeType scope,
const blink::WebString& name,
blink::WebSandboxFlags sandboxFlags);
virtual void frameDetached(blink::WebFrame* frame);
virtual void frameDetached(blink::WebFrame* frame, DetachType type);
private:
void CallOnReady();
@ -548,7 +549,8 @@ void PrepareFrameAndViewForPrint::CopySelection(
blink::WebView* web_view = blink::WebView::create(this);
owns_web_view_ = true;
content::RenderView::ApplyWebPreferences(prefs, web_view);
web_view->setMainFrame(blink::WebLocalFrame::create(this));
web_view->setMainFrame(
blink::WebLocalFrame::create(blink::WebTreeScopeType::Document, this));
frame_.Reset(web_view->mainFrame()->toWebLocalFrame());
node_to_print_.reset();
@ -573,14 +575,17 @@ void PrepareFrameAndViewForPrint::didStopLoading() {
blink::WebFrame* PrepareFrameAndViewForPrint::createChildFrame(
blink::WebLocalFrame* parent,
blink::WebTreeScopeType scope,
const blink::WebString& name,
blink::WebSandboxFlags sandboxFlags) {
blink::WebFrame* frame = blink::WebLocalFrame::create(this);
blink::WebFrame* frame = blink::WebLocalFrame::create(scope, this);
parent->appendChild(frame);
return frame;
}
void PrepareFrameAndViewForPrint::frameDetached(blink::WebFrame* frame) {
void PrepareFrameAndViewForPrint::frameDetached(blink::WebFrame* frame,
DetachType type) {
DCHECK(type == DetachType::Remove);
if (frame->parent())
frame->parent()->removeChild(frame);
frame->close();