Commit b0f736c9 authored by jhawkins@chromium.org's avatar jhawkins@chromium.org

Make render_view_context_menu.cc compile on Posix.

Review URL: http://codereview.chromium.org/27193

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10474 0039d316-1c4b-4281-b951-d872f2087c98
parent 3a1180c1
...@@ -714,7 +714,6 @@ if not env.Bit('windows'): ...@@ -714,7 +714,6 @@ if not env.Bit('windows'):
'sandbox_policy.cc', 'sandbox_policy.cc',
'shell_integration.cc', 'shell_integration.cc',
'tab_contents/native_ui_contents.cc', 'tab_contents/native_ui_contents.cc',
'tab_contents/render_view_context_menu.cc',
'tab_contents/view_source_contents.cc', 'tab_contents/view_source_contents.cc',
'tab_contents/web_drop_target.cc', 'tab_contents/web_drop_target.cc',
'task_manager.cc', 'task_manager.cc',
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
RenderViewContextMenu::RenderViewContextMenu( RenderViewContextMenu::RenderViewContextMenu(
Menu::Delegate* delegate, Menu::Delegate* delegate,
HWND owner, gfx::NativeWindow owner,
ContextNode node, ContextNode node,
const std::wstring& misspelled_word, const std::wstring& misspelled_word,
const std::vector<std::wstring>& misspelled_word_suggestions, const std::vector<std::wstring>& misspelled_word_suggestions,
...@@ -120,11 +120,11 @@ void RenderViewContextMenu::AppendEditableItems() { ...@@ -120,11 +120,11 @@ void RenderViewContextMenu::AppendEditableItems() {
} }
if (misspelled_word_suggestions_.size() > 0) if (misspelled_word_suggestions_.size() > 0)
AppendSeparator(); AppendSeparator();
// If word is misspelled, give option for "Add to dictionary" // If word is misspelled, give option for "Add to dictionary"
if (!misspelled_word_.empty()) { if (!misspelled_word_.empty()) {
if (misspelled_word_suggestions_.size() == 0) { if (misspelled_word_suggestions_.size() == 0) {
AppendMenuItemWithLabel(0, AppendMenuItemWithLabel(0,
l10n_util::GetString(IDS_CONTENT_CONTEXT_NO_SPELLING_SUGGESTIONS)); l10n_util::GetString(IDS_CONTENT_CONTEXT_NO_SPELLING_SUGGESTIONS));
} }
AppendDelegateMenuItem(IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY); AppendDelegateMenuItem(IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY);
......
...@@ -2,19 +2,28 @@ ...@@ -2,19 +2,28 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_H_ #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_
#define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_H_ #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_
#include "chrome/views/menu.h" #include <vector>
#include "base/gfx/native_widget_types.h"
#include "webkit/glue/context_menu.h" #include "webkit/glue/context_menu.h"
// TODO(port): Port this file.
#if defined(OS_WIN)
#include "chrome/views/menu.h"
#else
#include "chrome/common/temp_scaffolding_stubs.h"
#endif
class Profile; class Profile;
class RenderViewContextMenu : public Menu { class RenderViewContextMenu : public Menu {
public: public:
RenderViewContextMenu( RenderViewContextMenu(
Menu::Delegate* delegate, Menu::Delegate* delegate,
HWND owner, gfx::NativeWindow owner,
ContextNode node, ContextNode node,
const std::wstring& misspelled_word, const std::wstring& misspelled_word,
const std::vector<std::wstring>& misspelled_word_suggestions, const std::vector<std::wstring>& misspelled_word_suggestions,
...@@ -41,5 +50,5 @@ class RenderViewContextMenu : public Menu { ...@@ -41,5 +50,5 @@ class RenderViewContextMenu : public Menu {
DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu);
}; };
#endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_H_ #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_
...@@ -1172,7 +1172,6 @@ ...@@ -1172,7 +1172,6 @@
'browser/importer/ie_importer.cc', 'browser/importer/ie_importer.cc',
'browser/importer/importer.cc', 'browser/importer/importer.cc',
'browser/tab_contents/native_ui_contents.cc', 'browser/tab_contents/native_ui_contents.cc',
'browser/tab_contents/render_view_context_menu.cc',
'browser/tab_contents/render_view_context_menu_controller.cc', 'browser/tab_contents/render_view_context_menu_controller.cc',
'browser/tab_contents/web_drag_source.cc', 'browser/tab_contents/web_drag_source.cc',
'browser/tab_contents/web_drop_target.cc', 'browser/tab_contents/web_drop_target.cc',
......
...@@ -444,6 +444,7 @@ ...@@ -444,6 +444,7 @@
CABE9938BF2DF78D9862DC8B /* template_url_fetcher.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5D16EDB0F21455600861FAC /* template_url_fetcher.cc */; }; CABE9938BF2DF78D9862DC8B /* template_url_fetcher.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5D16EDB0F21455600861FAC /* template_url_fetcher.cc */; };
CC5A49EE23E4F332B06C99C8 /* search_provider.cc in Sources */ = {isa = PBXBuildFile; fileRef = 0114EE7E1097BDFBF94057E6 /* search_provider.cc */; }; CC5A49EE23E4F332B06C99C8 /* search_provider.cc in Sources */ = {isa = PBXBuildFile; fileRef = 0114EE7E1097BDFBF94057E6 /* search_provider.cc */; };
CE32446438BB391ACC07C3B7 /* autocomplete.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4F3E216FC08B4749FC8C2ED5 /* autocomplete.cc */; }; CE32446438BB391ACC07C3B7 /* autocomplete.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4F3E216FC08B4749FC8C2ED5 /* autocomplete.cc */; };
D5B8ADE25A518E0D12A90C8C /* render_view_context_menu.cc in Sources */ = {isa = PBXBuildFile; fileRef = A76E42A90F28EDB5009A7E88 /* render_view_context_menu.cc */; };
D87A8ECE6652FC99AF1ADA6F /* ssl_manager.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5D16ECC0F21451600861FAC /* ssl_manager.cc */; }; D87A8ECE6652FC99AF1ADA6F /* ssl_manager.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5D16ECC0F21451600861FAC /* ssl_manager.cc */; };
DDB41CECE38B852000F30D9F /* browsing_data_remover.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF84E0E9D4839009A6919 /* browsing_data_remover.cc */; }; DDB41CECE38B852000F30D9F /* browsing_data_remover.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF84E0E9D4839009A6919 /* browsing_data_remover.cc */; };
E40CC5E30F2E348900708647 /* history_contents_provider.cc in Sources */ = {isa = PBXBuildFile; fileRef = E40CC5E10F2E348900708647 /* history_contents_provider.cc */; }; E40CC5E30F2E348900708647 /* history_contents_provider.cc in Sources */ = {isa = PBXBuildFile; fileRef = E40CC5E10F2E348900708647 /* history_contents_provider.cc */; };
...@@ -5810,6 +5811,7 @@ ...@@ -5810,6 +5811,7 @@
E4F324500EE5CF7C002533CE /* query_parser.cc in Sources */, E4F324500EE5CF7C002533CE /* query_parser.cc in Sources */,
E4F3247A0EE5D17E002533CE /* referrer.cc in Sources */, E4F3247A0EE5D17E002533CE /* referrer.cc in Sources */,
A7C612990F30D63D008CEE5D /* render_process_host.cc in Sources */, A7C612990F30D63D008CEE5D /* render_process_host.cc in Sources */,
D5B8ADE25A518E0D12A90C8C /* render_view_context_menu.cc in Sources */,
E434C0280F3A0C0100B665C7 /* render_view_host.cc in Sources */, E434C0280F3A0C0100B665C7 /* render_view_host.cc in Sources */,
94542322A5E5A8F4FDDAB7F0 /* render_view_host_manager.cc in Sources */, 94542322A5E5A8F4FDDAB7F0 /* render_view_host_manager.cc in Sources */,
E434BBBF0F37D6DB00B665C7 /* render_widget_helper.cc in Sources */, E434BBBF0F37D6DB00B665C7 /* render_widget_helper.cc in Sources */,
......
...@@ -322,8 +322,34 @@ class InputWindowDelegate { ...@@ -322,8 +322,34 @@ class InputWindowDelegate {
class Menu { class Menu {
public: public:
enum AnchorPoint {
TOPLEFT,
TOPRIGHT
};
enum MenuItemType {
NORMAL,
CHECKBOX,
RADIO,
SEPARATOR
};
class Delegate { class Delegate {
}; };
Menu(Delegate* delegate, AnchorPoint anchor, gfx::NativeWindow owner) {
NOTIMPLEMENTED();
}
void AppendMenuItem(int item_id, const std::wstring& label,
MenuItemType type) {
NOTIMPLEMENTED();
}
void AppendMenuItemWithLabel(int item_id, const std::wstring& label) {
NOTIMPLEMENTED();
}
Menu* AppendSubMenu(int item_id, const std::wstring& label) {
NOTIMPLEMENTED();
return NULL;
}
void AppendSeparator() { NOTIMPLEMENTED(); }
void AppendDelegateMenuItem(int item_id) { NOTIMPLEMENTED(); }
}; };
views::Window* CreateInputWindow(gfx::NativeWindow parent_hwnd, views::Window* CreateInputWindow(gfx::NativeWindow parent_hwnd,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment