Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 1406743002: Switch cases that returns same value should use fall through. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 case IDC_CHECK_SPELLING_WHILE_TYPING: 1386 case IDC_CHECK_SPELLING_WHILE_TYPING:
1387 return prefs->GetBoolean(prefs::kEnableContinuousSpellcheck); 1387 return prefs->GetBoolean(prefs::kEnableContinuousSpellcheck);
1388 1388
1389 #if !defined(OS_MACOSX) && defined(OS_POSIX) 1389 #if !defined(OS_MACOSX) && defined(OS_POSIX)
1390 // TODO(suzhe): this should not be enabled for password fields. 1390 // TODO(suzhe): this should not be enabled for password fields.
1391 case IDC_INPUT_METHODS_MENU: 1391 case IDC_INPUT_METHODS_MENU:
1392 return true; 1392 return true;
1393 #endif 1393 #endif
1394 1394
1395 case IDC_SPELLCHECK_MENU: 1395 case IDC_SPELLCHECK_MENU:
1396 return true;
1397
1398 case IDC_CONTENT_CONTEXT_OPENLINKWITH: 1396 case IDC_CONTENT_CONTEXT_OPENLINKWITH:
1399 return true;
1400
1401 case IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_SETTINGS: 1397 case IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_SETTINGS:
1402 return true;
1403
1404 case IDC_CONTENT_CONTEXT_FORCESAVEPASSWORD: 1398 case IDC_CONTENT_CONTEXT_FORCESAVEPASSWORD:
1405 return true; 1399 return true;
1406 1400
1407 case IDC_ROUTE_MEDIA: { 1401 case IDC_ROUTE_MEDIA: {
1408 DCHECK(switches::MediaRouterEnabled()); 1402 DCHECK(switches::MediaRouterEnabled());
1409 1403
1410 // Disable the command if there is an active modal dialog. 1404 // Disable the command if there is an active modal dialog.
1411 Browser* browser = 1405 Browser* browser =
1412 chrome::FindBrowserWithWebContents(source_web_contents_); 1406 chrome::FindBrowserWithWebContents(source_web_contents_);
1413 if (!browser || browser->profile()->IsOffTheRecord()) 1407 if (!browser || browser->profile()->IsOffTheRecord())
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1981 source_web_contents_->GetRenderViewHost()-> 1975 source_web_contents_->GetRenderViewHost()->
1982 ExecuteMediaPlayerActionAtLocation(location, action); 1976 ExecuteMediaPlayerActionAtLocation(location, action);
1983 } 1977 }
1984 1978
1985 void RenderViewContextMenu::PluginActionAt( 1979 void RenderViewContextMenu::PluginActionAt(
1986 const gfx::Point& location, 1980 const gfx::Point& location,
1987 const WebPluginAction& action) { 1981 const WebPluginAction& action) {
1988 source_web_contents_->GetRenderViewHost()-> 1982 source_web_contents_->GetRenderViewHost()->
1989 ExecutePluginActionAtLocation(location, action); 1983 ExecutePluginActionAtLocation(location, action);
1990 } 1984 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698