Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/renderer_context_menu/render_view_context_menu.h" | 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1403 menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_COPY, | 1403 menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_COPY, |
| 1404 IDS_CONTENT_CONTEXT_COPY); | 1404 IDS_CONTENT_CONTEXT_COPY); |
| 1405 menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_PASTE, | 1405 menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_PASTE, |
| 1406 IDS_CONTENT_CONTEXT_PASTE); | 1406 IDS_CONTENT_CONTEXT_PASTE); |
| 1407 if (params_.misspelled_word.empty()) { | 1407 if (params_.misspelled_word.empty()) { |
| 1408 menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE, | 1408 menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE, |
| 1409 IDS_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE); | 1409 IDS_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE); |
| 1410 menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_SELECTALL, | 1410 menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_SELECTALL, |
| 1411 IDS_CONTENT_CONTEXT_SELECTALL); | 1411 IDS_CONTENT_CONTEXT_SELECTALL); |
| 1412 } | 1412 } |
| 1413 | |
| 1414 menu_model_.AddSeparator(ui::NORMAL_SEPARATOR); | |
|
lazyboy
2017/02/28 00:29:02
This is prone to further bugs I think:
If group it
edwardjung
2017/02/28 01:01:06
Done.
| |
| 1415 } | 1413 } |
| 1416 | 1414 |
| 1417 void RenderViewContextMenu::AppendLanguageSettings() { | 1415 void RenderViewContextMenu::AppendLanguageSettings() { |
| 1418 const bool use_spelling = !chrome::IsRunningInForcedAppMode(); | 1416 const bool use_spelling = !chrome::IsRunningInForcedAppMode(); |
| 1419 if (!use_spelling) | 1417 if (!use_spelling) |
| 1420 return; | 1418 return; |
| 1421 | 1419 |
| 1422 #if defined(OS_MACOSX) | 1420 #if defined(OS_MACOSX) |
| 1423 menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS, | 1421 menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS, |
| 1424 IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS); | 1422 IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS); |
| (...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2505 void RenderViewContextMenu::PluginActionAt( | 2503 void RenderViewContextMenu::PluginActionAt( |
| 2506 const gfx::Point& location, | 2504 const gfx::Point& location, |
| 2507 const WebPluginAction& action) { | 2505 const WebPluginAction& action) { |
| 2508 source_web_contents_->GetRenderViewHost()-> | 2506 source_web_contents_->GetRenderViewHost()-> |
| 2509 ExecutePluginActionAtLocation(location, action); | 2507 ExecutePluginActionAtLocation(location, action); |
| 2510 } | 2508 } |
| 2511 | 2509 |
| 2512 Browser* RenderViewContextMenu::GetBrowser() const { | 2510 Browser* RenderViewContextMenu::GetBrowser() const { |
| 2513 return chrome::FindBrowserWithWebContents(embedder_web_contents_); | 2511 return chrome::FindBrowserWithWebContents(embedder_web_contents_); |
| 2514 } | 2512 } |
| OLD | NEW |