| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 8 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 case IDC_PRINT: | 1377 case IDC_PRINT: |
| 1378 if (params_.media_type == WebContextMenuData::MediaTypeNone) { | 1378 if (params_.media_type == WebContextMenuData::MediaTypeNone) { |
| 1379 TabContentsWrapper* tab_contents_wrapper = | 1379 TabContentsWrapper* tab_contents_wrapper = |
| 1380 TabContentsWrapper::GetCurrentWrapperForContents( | 1380 TabContentsWrapper::GetCurrentWrapperForContents( |
| 1381 source_tab_contents_); | 1381 source_tab_contents_); |
| 1382 if (!tab_contents_wrapper) | 1382 if (!tab_contents_wrapper) |
| 1383 break; | 1383 break; |
| 1384 if (switches::IsPrintPreviewEnabled()) | 1384 if (switches::IsPrintPreviewEnabled()) |
| 1385 tab_contents_wrapper->print_view_manager()->PrintPreviewNow(); | 1385 tab_contents_wrapper->print_view_manager()->PrintPreviewNow(); |
| 1386 else | 1386 else |
| 1387 tab_contents_wrapper->print_view_manager()->PrintNow(); | 1387 tab_contents_wrapper->print_view_manager()->PrintNow(NULL); |
| 1388 } else { | 1388 } else { |
| 1389 rvh->Send(new PrintMsg_PrintNodeUnderContextMenu(rvh->routing_id())); | 1389 rvh->Send(new PrintMsg_PrintNodeUnderContextMenu(rvh->routing_id())); |
| 1390 } | 1390 } |
| 1391 break; | 1391 break; |
| 1392 | 1392 |
| 1393 case IDC_VIEW_SOURCE: | 1393 case IDC_VIEW_SOURCE: |
| 1394 source_tab_contents_->ViewSource(); | 1394 source_tab_contents_->ViewSource(); |
| 1395 break; | 1395 break; |
| 1396 | 1396 |
| 1397 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: | 1397 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1638 g_browser_process->clipboard()); | 1638 g_browser_process->clipboard()); |
| 1639 } | 1639 } |
| 1640 | 1640 |
| 1641 void RenderViewContextMenu::MediaPlayerActionAt( | 1641 void RenderViewContextMenu::MediaPlayerActionAt( |
| 1642 const gfx::Point& location, | 1642 const gfx::Point& location, |
| 1643 const WebMediaPlayerAction& action) { | 1643 const WebMediaPlayerAction& action) { |
| 1644 RenderViewHost* rvh = source_tab_contents_->render_view_host(); | 1644 RenderViewHost* rvh = source_tab_contents_->render_view_host(); |
| 1645 rvh->Send(new ViewMsg_MediaPlayerActionAt( | 1645 rvh->Send(new ViewMsg_MediaPlayerActionAt( |
| 1646 rvh->routing_id(), location, action)); | 1646 rvh->routing_id(), location, action)); |
| 1647 } | 1647 } |
| OLD | NEW |