| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <set> | 6 #include <set> |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 9 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
| 10 | 10 |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 for (i = sorted_ids.begin(); | 526 for (i = sorted_ids.begin(); |
| 527 i != sorted_ids.end(); ++i) { | 527 i != sorted_ids.end(); ++i) { |
| 528 AppendExtensionItems(i->second, &index); | 528 AppendExtensionItems(i->second, &index); |
| 529 } | 529 } |
| 530 UMA_HISTOGRAM_TIMES("Extensions.ContextMenus_BuildTime", | 530 UMA_HISTOGRAM_TIMES("Extensions.ContextMenus_BuildTime", |
| 531 base::TimeTicks::Now() - begin); | 531 base::TimeTicks::Now() - begin); |
| 532 UMA_HISTOGRAM_COUNTS("Extensions.ContextMenus_ItemCount", index); | 532 UMA_HISTOGRAM_COUNTS("Extensions.ContextMenus_ItemCount", index); |
| 533 } | 533 } |
| 534 | 534 |
| 535 void RenderViewContextMenu::InitMenu() { | 535 void RenderViewContextMenu::InitMenu() { |
| 536 content::ViewType view_type = source_web_contents_->GetViewType(); | 536 chrome::ViewType view_type = chrome::GetViewType(source_web_contents_); |
| 537 if (view_type == chrome::VIEW_TYPE_APP_SHELL) { | 537 if (view_type == chrome::VIEW_TYPE_APP_SHELL) { |
| 538 AppendPlatformAppItems(); | 538 AppendPlatformAppItems(); |
| 539 return; | 539 return; |
| 540 } else if (view_type == chrome::VIEW_TYPE_EXTENSION_POPUP) { | 540 } else if (view_type == chrome::VIEW_TYPE_EXTENSION_POPUP) { |
| 541 AppendPopupExtensionItems(); | 541 AppendPopupExtensionItems(); |
| 542 return; | 542 return; |
| 543 } | 543 } |
| 544 | 544 |
| 545 bool has_link = !params_.unfiltered_link_url.is_empty(); | 545 bool has_link = !params_.unfiltered_link_url.is_empty(); |
| 546 bool has_selection = !params_.selection_text.empty(); | 546 bool has_selection = !params_.selection_text.empty(); |
| (...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1984 source_web_contents_->GetRenderViewHost()-> | 1984 source_web_contents_->GetRenderViewHost()-> |
| 1985 ExecuteMediaPlayerActionAtLocation(location, action); | 1985 ExecuteMediaPlayerActionAtLocation(location, action); |
| 1986 } | 1986 } |
| 1987 | 1987 |
| 1988 void RenderViewContextMenu::PluginActionAt( | 1988 void RenderViewContextMenu::PluginActionAt( |
| 1989 const gfx::Point& location, | 1989 const gfx::Point& location, |
| 1990 const WebPluginAction& action) { | 1990 const WebPluginAction& action) { |
| 1991 source_web_contents_->GetRenderViewHost()-> | 1991 source_web_contents_->GetRenderViewHost()-> |
| 1992 ExecutePluginActionAtLocation(location, action); | 1992 ExecutePluginActionAtLocation(location, action); |
| 1993 } | 1993 } |
| OLD | NEW |