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 <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 } | 365 } |
366 default: | 366 default: |
367 NOTREACHED(); | 367 NOTREACHED(); |
368 break; | 368 break; |
369 } | 369 } |
370 } | 370 } |
371 } | 371 } |
372 | 372 |
373 // Helper function to escape "&" as "&&". | 373 // Helper function to escape "&" as "&&". |
374 void EscapeAmpersands(base::string16* text) { | 374 void EscapeAmpersands(base::string16* text) { |
375 const base::char16 ampersand[] = {'&', 0}; | 375 base::ReplaceChars(*text, base::ASCIIToUTF16("&"), base::ASCIIToUTF16("&&"), |
376 base::ReplaceChars(*text, ampersand, base::ASCIIToUTF16("&&"), text); | 376 text); |
377 } | 377 } |
378 | 378 |
379 } // namespace | 379 } // namespace |
380 | 380 |
381 // static | 381 // static |
382 const size_t RenderViewContextMenu::kMaxSelectionTextLength = 50; | 382 const size_t RenderViewContextMenu::kMaxSelectionTextLength = 50; |
383 | 383 |
384 // static | 384 // static |
385 bool RenderViewContextMenu::IsDevToolsURL(const GURL& url) { | 385 bool RenderViewContextMenu::IsDevToolsURL(const GURL& url) { |
386 return url.SchemeIs(content::kChromeDevToolsScheme); | 386 return url.SchemeIs(content::kChromeDevToolsScheme); |
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1987 source_web_contents_->GetRenderViewHost()-> | 1987 source_web_contents_->GetRenderViewHost()-> |
1988 ExecuteMediaPlayerActionAtLocation(location, action); | 1988 ExecuteMediaPlayerActionAtLocation(location, action); |
1989 } | 1989 } |
1990 | 1990 |
1991 void RenderViewContextMenu::PluginActionAt( | 1991 void RenderViewContextMenu::PluginActionAt( |
1992 const gfx::Point& location, | 1992 const gfx::Point& location, |
1993 const WebPluginAction& action) { | 1993 const WebPluginAction& action) { |
1994 source_web_contents_->GetRenderViewHost()-> | 1994 source_web_contents_->GetRenderViewHost()-> |
1995 ExecutePluginActionAtLocation(location, action); | 1995 ExecutePluginActionAtLocation(location, action); |
1996 } | 1996 } |
OLD | NEW |