OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "extensions/browser/app_window/app_window_contents.h" | 5 #include "extensions/browser/app_window/app_window_contents.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 IPC_BEGIN_MESSAGE_MAP(AppWindowContentsImpl, message) | 101 IPC_BEGIN_MESSAGE_MAP(AppWindowContentsImpl, message) |
102 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) | 102 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) |
103 IPC_MESSAGE_HANDLER(ExtensionHostMsg_UpdateDraggableRegions, | 103 IPC_MESSAGE_HANDLER(ExtensionHostMsg_UpdateDraggableRegions, |
104 UpdateDraggableRegions) | 104 UpdateDraggableRegions) |
105 IPC_MESSAGE_UNHANDLED(handled = false) | 105 IPC_MESSAGE_UNHANDLED(handled = false) |
106 IPC_END_MESSAGE_MAP() | 106 IPC_END_MESSAGE_MAP() |
107 return handled; | 107 return handled; |
108 } | 108 } |
109 | 109 |
110 WindowController* AppWindowContentsImpl::GetExtensionWindowController() const { | 110 WindowController* AppWindowContentsImpl::GetExtensionWindowController() const { |
111 return NULL; | 111 return nullptr; |
112 } | 112 } |
113 | 113 |
114 content::WebContents* AppWindowContentsImpl::GetAssociatedWebContents() const { | 114 content::WebContents* AppWindowContentsImpl::GetAssociatedWebContents() const { |
115 return web_contents_.get(); | 115 return web_contents_.get(); |
116 } | 116 } |
117 | 117 |
118 void AppWindowContentsImpl::OnRequest( | 118 void AppWindowContentsImpl::OnRequest( |
119 const ExtensionHostMsg_Request_Params& params) { | 119 const ExtensionHostMsg_Request_Params& params) { |
120 extension_function_dispatcher_->Dispatch( | 120 extension_function_dispatcher_->Dispatch( |
121 params, web_contents_->GetRenderViewHost()); | 121 params, web_contents_->GetRenderViewHost()); |
122 } | 122 } |
123 | 123 |
124 void AppWindowContentsImpl::UpdateDraggableRegions( | 124 void AppWindowContentsImpl::UpdateDraggableRegions( |
125 const std::vector<DraggableRegion>& regions) { | 125 const std::vector<DraggableRegion>& regions) { |
126 host_->UpdateDraggableRegions(regions); | 126 host_->UpdateDraggableRegions(regions); |
127 } | 127 } |
128 | 128 |
129 void AppWindowContentsImpl::SuspendRenderViewHost( | 129 void AppWindowContentsImpl::SuspendRenderViewHost( |
130 content::RenderViewHost* rvh) { | 130 content::RenderViewHost* rvh) { |
131 DCHECK(rvh); | 131 DCHECK(rvh); |
132 content::BrowserThread::PostTask( | 132 content::BrowserThread::PostTask( |
133 content::BrowserThread::IO, FROM_HERE, | 133 content::BrowserThread::IO, FROM_HERE, |
134 base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute, | 134 base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute, |
135 base::Unretained(content::ResourceDispatcherHost::Get()), | 135 base::Unretained(content::ResourceDispatcherHost::Get()), |
136 rvh->GetProcess()->GetID(), rvh->GetRoutingID())); | 136 rvh->GetProcess()->GetID(), rvh->GetRoutingID())); |
137 } | 137 } |
138 | 138 |
139 } // namespace extensions | 139 } // namespace extensions |
OLD | NEW |