OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1423 // Don't enable the web inspector if the developer tools are disabled via | 1423 // Don't enable the web inspector if the developer tools are disabled via |
1424 // the preference dev-tools-disabled. | 1424 // the preference dev-tools-disabled. |
1425 if (profile_->GetPrefs()->GetBoolean(prefs::kDevToolsDisabled)) | 1425 if (profile_->GetPrefs()->GetBoolean(prefs::kDevToolsDisabled)) |
1426 return false; | 1426 return false; |
1427 } | 1427 } |
1428 | 1428 |
1429 return true; | 1429 return true; |
1430 } | 1430 } |
1431 | 1431 |
1432 string16 RenderViewContextMenu::PrintableSelectionText() { | 1432 string16 RenderViewContextMenu::PrintableSelectionText() { |
1433 return WideToUTF16(l10n_util::TruncateString(params_.selection_text, | 1433 return l10n_util::TruncateString(WideToUTF16Hack(params_.selection_text), |
1434 kMaxSelectionTextLength)); | 1434 kMaxSelectionTextLength); |
1435 } | 1435 } |
1436 | 1436 |
1437 // Controller functions -------------------------------------------------------- | 1437 // Controller functions -------------------------------------------------------- |
1438 | 1438 |
1439 void RenderViewContextMenu::OpenURL( | 1439 void RenderViewContextMenu::OpenURL( |
1440 const GURL& url, | 1440 const GURL& url, |
1441 WindowOpenDisposition disposition, | 1441 WindowOpenDisposition disposition, |
1442 PageTransition::Type transition) { | 1442 PageTransition::Type transition) { |
1443 source_tab_contents_->OpenURL(url, GURL(), disposition, transition); | 1443 source_tab_contents_->OpenURL(url, GURL(), disposition, transition); |
1444 } | 1444 } |
(...skipping 15 matching lines...) Expand all Loading... |
1460 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), | 1460 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), |
1461 g_browser_process->clipboard()); | 1461 g_browser_process->clipboard()); |
1462 } | 1462 } |
1463 | 1463 |
1464 void RenderViewContextMenu::MediaPlayerActionAt( | 1464 void RenderViewContextMenu::MediaPlayerActionAt( |
1465 const gfx::Point& location, | 1465 const gfx::Point& location, |
1466 const WebMediaPlayerAction& action) { | 1466 const WebMediaPlayerAction& action) { |
1467 source_tab_contents_->render_view_host()->MediaPlayerActionAt( | 1467 source_tab_contents_->render_view_host()->MediaPlayerActionAt( |
1468 location, action); | 1468 location, action); |
1469 } | 1469 } |
OLD | NEW |