OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "content/shell/shell_web_contents_view_delegate.h" | 5 #include "content/shell/shell_web_contents_view_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/public/browser/devtools_agent_host.h" | 8 #include "content/public/browser/devtools_agent_host.h" |
9 #include "content/public/browser/devtools_http_handler.h" | 9 #include "content/public/browser/devtools_http_handler.h" |
10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 212 } |
213 | 213 |
214 void ShellWebContentsViewDelegate::OnOpenURLMenuActivated(GtkWidget* widget) { | 214 void ShellWebContentsViewDelegate::OnOpenURLMenuActivated(GtkWidget* widget) { |
215 ShellBrowserContext* browser_context = | 215 ShellBrowserContext* browser_context = |
216 static_cast<ShellContentBrowserClient*>( | 216 static_cast<ShellContentBrowserClient*>( |
217 GetContentClient()->browser())->browser_context(); | 217 GetContentClient()->browser())->browser_context(); |
218 Shell::CreateNewWindow(browser_context, | 218 Shell::CreateNewWindow(browser_context, |
219 params_.link_url, | 219 params_.link_url, |
220 NULL, | 220 NULL, |
221 MSG_ROUTING_NONE, | 221 MSG_ROUTING_NONE, |
222 NULL); | 222 gfx::Size()); |
223 } | 223 } |
224 | 224 |
225 void ShellWebContentsViewDelegate::OnCutMenuActivated(GtkWidget* widget) { | 225 void ShellWebContentsViewDelegate::OnCutMenuActivated(GtkWidget* widget) { |
226 web_contents_->GetRenderViewHost()->Cut(); | 226 web_contents_->GetRenderViewHost()->Cut(); |
227 } | 227 } |
228 | 228 |
229 void ShellWebContentsViewDelegate::OnCopyMenuActivated(GtkWidget* widget) { | 229 void ShellWebContentsViewDelegate::OnCopyMenuActivated(GtkWidget* widget) { |
230 web_contents_->GetRenderViewHost()->Copy(); | 230 web_contents_->GetRenderViewHost()->Copy(); |
231 } | 231 } |
232 | 232 |
(...skipping 10 matching lines...) Expand all Loading... |
243 static_cast<ShellContentBrowserClient*>( | 243 static_cast<ShellContentBrowserClient*>( |
244 GetContentClient()->browser()); | 244 GetContentClient()->browser()); |
245 ShellDevToolsDelegate* delegate = | 245 ShellDevToolsDelegate* delegate = |
246 browser_client->shell_browser_main_parts()->devtools_delegate(); | 246 browser_client->shell_browser_main_parts()->devtools_delegate(); |
247 GURL url = delegate->devtools_http_handler()->GetFrontendURL( | 247 GURL url = delegate->devtools_http_handler()->GetFrontendURL( |
248 DevToolsAgentHost::GetFor(web_contents_->GetRenderViewHost())); | 248 DevToolsAgentHost::GetFor(web_contents_->GetRenderViewHost())); |
249 Shell::CreateNewWindow(web_contents_->GetBrowserContext(), | 249 Shell::CreateNewWindow(web_contents_->GetBrowserContext(), |
250 url, | 250 url, |
251 NULL, | 251 NULL, |
252 MSG_ROUTING_NONE, | 252 MSG_ROUTING_NONE, |
253 NULL); | 253 gfx::Size()); |
254 } | 254 } |
255 | 255 |
256 } // namespace content | 256 } // namespace content |
OLD | NEW |