| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "chrome/browser/spellchecker_platform_engine.h" | 40 #include "chrome/browser/spellchecker_platform_engine.h" |
| 41 #include "chrome/browser/tab_contents/navigation_entry.h" | 41 #include "chrome/browser/tab_contents/navigation_entry.h" |
| 42 #include "chrome/browser/tab_contents/tab_contents.h" | 42 #include "chrome/browser/tab_contents/tab_contents.h" |
| 43 #include "chrome/browser/translate/translate_prefs.h" | 43 #include "chrome/browser/translate/translate_prefs.h" |
| 44 #include "chrome/browser/translate/translate_manager.h" | 44 #include "chrome/browser/translate/translate_manager.h" |
| 45 #include "chrome/common/chrome_constants.h" | 45 #include "chrome/common/chrome_constants.h" |
| 46 #include "chrome/common/chrome_switches.h" | 46 #include "chrome/common/chrome_switches.h" |
| 47 #include "chrome/common/content_restriction.h" | 47 #include "chrome/common/content_restriction.h" |
| 48 #include "chrome/common/pref_names.h" | 48 #include "chrome/common/pref_names.h" |
| 49 #include "chrome/common/url_constants.h" | 49 #include "chrome/common/url_constants.h" |
| 50 #include "gfx/favicon_size.h" | |
| 51 #include "grit/generated_resources.h" | 50 #include "grit/generated_resources.h" |
| 52 #include "net/base/escape.h" | 51 #include "net/base/escape.h" |
| 53 #include "net/url_request/url_request.h" | 52 #include "net/url_request/url_request.h" |
| 54 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" | 53 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" |
| 55 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" | 54 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" |
| 56 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" | 55 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" |
| 57 #include "ui/base/l10n/l10n_util.h" | 56 #include "ui/base/l10n/l10n_util.h" |
| 57 #include "ui/gfx/favicon_size.h" |
| 58 #include "webkit/glue/webmenuitem.h" | 58 #include "webkit/glue/webmenuitem.h" |
| 59 | 59 |
| 60 using WebKit::WebContextMenuData; | 60 using WebKit::WebContextMenuData; |
| 61 using WebKit::WebMediaPlayerAction; | 61 using WebKit::WebMediaPlayerAction; |
| 62 | 62 |
| 63 namespace { | 63 namespace { |
| 64 | 64 |
| 65 bool IsCustomItemEnabled(const std::vector<WebMenuItem>& items, int id) { | 65 bool IsCustomItemEnabled(const std::vector<WebMenuItem>& items, int id) { |
| 66 DCHECK(id >= IDC_CONTENT_CONTEXT_CUSTOM_FIRST && | 66 DCHECK(id >= IDC_CONTENT_CONTEXT_CUSTOM_FIRST && |
| 67 id <= IDC_CONTENT_CONTEXT_CUSTOM_LAST); | 67 id <= IDC_CONTENT_CONTEXT_CUSTOM_LAST); |
| (...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1530 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), | 1530 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), |
| 1531 g_browser_process->clipboard()); | 1531 g_browser_process->clipboard()); |
| 1532 } | 1532 } |
| 1533 | 1533 |
| 1534 void RenderViewContextMenu::MediaPlayerActionAt( | 1534 void RenderViewContextMenu::MediaPlayerActionAt( |
| 1535 const gfx::Point& location, | 1535 const gfx::Point& location, |
| 1536 const WebMediaPlayerAction& action) { | 1536 const WebMediaPlayerAction& action) { |
| 1537 source_tab_contents_->render_view_host()->MediaPlayerActionAt( | 1537 source_tab_contents_->render_view_host()->MediaPlayerActionAt( |
| 1538 location, action); | 1538 location, action); |
| 1539 } | 1539 } |
| OLD | NEW |