summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser.scons1
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu_controller.cc34
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu_controller.h12
-rw-r--r--chrome/common/temp_scaffolding_stubs.h36
4 files changed, 73 insertions, 10 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index c3074b9..477a16e 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -735,7 +735,6 @@ if not env.Bit('windows'):
'shell_integration.cc',
'tab_contents/native_ui_contents.cc',
'tab_contents/render_view_context_menu.cc',
- 'tab_contents/render_view_context_menu_controller.cc',
'tab_contents/tab_contents.cc',
'tab_contents/tab_contents_factory.cc',
'tab_contents/view_source_contents.cc',
diff --git a/chrome/browser/tab_contents/render_view_context_menu_controller.cc b/chrome/browser/tab_contents/render_view_context_menu_controller.cc
index 9988091..b6cb107 100644
--- a/chrome/browser/tab_contents/render_view_context_menu_controller.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu_controller.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "build/build_config.h"
+
#include "chrome/browser/tab_contents/render_view_context_menu_controller.h"
#include "base/command_line.h"
@@ -9,28 +11,32 @@
#include "base/scoped_clipboard_writer.h"
#include "base/string_util.h"
#include "chrome/app/chrome_dll_resource.h"
-#include "chrome/browser/views/options/fonts_languages_window_view.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/spellchecker.h"
-#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/save_package.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/search_engines/template_url_model.h"
-#include "chrome/browser/views/page_info_window.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/web_contents.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/clipboard_service.h"
#include "chrome/common/l10n_util.h"
-#include "chrome/common/win_util.h"
#include "net/base/escape.h"
#include "net/base/net_util.h"
#include "net/url_request/url_request.h"
+#if defined(OS_WIN)
+// TODO(port): port these files.
+#include "chrome/browser/download/download_manager.h"
+#include "chrome/browser/spellchecker.h"
+#include "chrome/browser/views/options/fonts_languages_window_view.h"
+#include "chrome/browser/views/page_info_window.h"
+#include "chrome/common/clipboard_service.h"
+#include "chrome/common/win_util.h"
+#endif
+
#include "generated_resources.h"
RenderViewContextMenuController::RenderViewContextMenuController(
@@ -374,13 +380,23 @@ void RenderViewContextMenuController::ExecuteCommand(int id) {
break;
case IDS_CONTENT_CONTEXT_SAVEFRAMEAS:
+#if defined(OS_WIN)
win_util::MessageBox(NULL, L"Context Menu Action", L"Save Frame As",
MB_OK);
+#else
+ // TODO(port): message box equivalent
+ NOTIMPLEMENTED() << "IDS_CONTENT_CONTEXT_SAVEFRAMEAS";
+#endif
break;
case IDS_CONTENT_CONTEXT_PRINTFRAME:
+#if defined(OS_WIN)
win_util::MessageBox(NULL, L"Context Menu Action", L"Print Frame",
MB_OK);
+#else
+ // TODO(port): message box equivalent
+ NOTIMPLEMENTED() << "IDS_CONTENT_CONTEXT_PRINTFRAME";
+#endif
break;
case IDS_CONTENT_CONTEXT_VIEWFRAMESOURCE:
@@ -469,12 +485,17 @@ void RenderViewContextMenuController::ExecuteCommand(int id) {
break;
case IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS: {
+#if defined(OS_WIN)
FontsLanguagesWindowView* window_ = new FontsLanguagesWindowView(
source_web_contents_->profile());
views::Window::CreateChromeWindow(
source_web_contents_->GetContentNativeView(),
gfx::Rect(), window_)->Show();
window_->SelectLanguagesTab();
+#else
+ // TODO(port): need views::Window
+ NOTIMPLEMENTED() << "IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS";
+#endif
break;
}
@@ -523,4 +544,3 @@ bool RenderViewContextMenuController::IsDevCommandEnabled(int id) const {
return true;
}
-
diff --git a/chrome/browser/tab_contents/render_view_context_menu_controller.h b/chrome/browser/tab_contents/render_view_context_menu_controller.h
index b2e5676..9d18ff6 100644
--- a/chrome/browser/tab_contents/render_view_context_menu_controller.h
+++ b/chrome/browser/tab_contents/render_view_context_menu_controller.h
@@ -5,12 +5,21 @@
#ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_CONTROLLER_H_
#define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_CONTROLLER_H_
+#include "build/build_config.h"
+
#include "chrome/common/pref_member.h"
#include "chrome/common/page_transition_types.h"
-#include "chrome/views/menu.h"
#include "webkit/glue/context_menu.h"
#include "webkit/glue/window_open_disposition.h"
+#if defined(OS_WIN)
+// TODO(port): port this file.
+#include "chrome/views/menu.h"
+#else
+#include "chrome/common/temp_scaffolding_stubs.h"
+#include "chrome/views/accelerator.h"
+#endif
+
class WebContents;
class RenderViewContextMenuController : public Menu::Delegate {
@@ -55,4 +64,3 @@ class RenderViewContextMenuController : public Menu::Delegate {
};
#endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_CONTROLLER_H_
-
diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h
index 38b93aa..ac2ac55 100644
--- a/chrome/common/temp_scaffolding_stubs.h
+++ b/chrome/common/temp_scaffolding_stubs.h
@@ -341,6 +341,12 @@ class TableModel {
} // namespace views
+class Menu {
+ public:
+ class Delegate {
+ };
+};
+
//---------------------------------------------------------------------------
// These stubs are for Browser
@@ -566,6 +572,7 @@ class Encryptor {
class SpellChecker : public base::RefCountedThreadSafe<SpellChecker> {
public:
typedef std::wstring Language;
+ typedef std::vector<Language> Languages;
SpellChecker(const std::wstring& dict_dir,
const Language& language,
URLRequestContext* request_context,
@@ -579,6 +586,12 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker> {
NOTIMPLEMENTED();
return true;
}
+ static int GetSpellCheckLanguagesToDisplayInContextMenu(
+ Profile* profile,
+ Languages* display_languages) {
+ NOTIMPLEMENTED();
+ return 0;
+ }
};
class WebAppLauncher {
@@ -747,4 +760,27 @@ class RepostFormWarningDialog {
virtual ~RepostFormWarningDialog() { }
};
+class PageInfoWindow {
+ public:
+ enum TabID {
+ GENERAL = 0,
+ SECURITY,
+ };
+ static void CreatePageInfo(Profile* profile, NavigationEntry* nav_entry,
+ gfx::NativeView parent_hwnd, TabID tab) {
+ NOTIMPLEMENTED();
+ }
+ static void CreateFrameInfo(Profile* profile, const GURL& url,
+ const NavigationEntry::SSLStatus& ssl,
+ gfx::NativeView parent_hwnd, TabID tab) {
+ NOTIMPLEMENTED();
+ }
+};
+
+class FontsLanguagesWindowView {
+ public:
+ explicit FontsLanguagesWindowView(Profile* profile) { NOTIMPLEMENTED(); }
+ void SelectLanguagesTab() { NOTIMPLEMENTED(); }
+};
+
#endif // CHROME_COMMON_TEMP_SCAFFOLDING_STUBS_H_