summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-18 15:16:54 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-18 15:16:54 +0000
commitb87ee5256f760e63d5373258b4b51cc1f7258b5d (patch)
treec1401ca9694b72fd5f4df66b3e50b178adf64ef7 /content
parent5dbb5e732ebb3e66ab04b961a62329fd6f9a4b15 (diff)
downloadchromium_src-b87ee5256f760e63d5373258b4b51cc1f7258b5d.zip
chromium_src-b87ee5256f760e63d5373258b4b51cc1f7258b5d.tar.gz
chromium_src-b87ee5256f760e63d5373258b4b51cc1f7258b5d.tar.bz2
Move NativeWebKeyboardEvent to the content namespace.
TBR=ben Review URL: https://chromiumcodereview.appspot.com/10383239 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137865 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/gtk_im_context_wrapper.cc1
-rw-r--r--content/browser/renderer_host/gtk_im_context_wrapper.h17
-rw-r--r--content/browser/renderer_host/gtk_key_bindings_handler.cc2
-rw-r--r--content/browser/renderer_host/gtk_key_bindings_handler.h5
-rw-r--r--content/browser/renderer_host/gtk_key_bindings_handler_unittest.cc2
-rw-r--r--content/browser/renderer_host/native_web_keyboard_event_android.cc4
-rw-r--r--content/browser/renderer_host/native_web_keyboard_event_aura.cc4
-rw-r--r--content/browser/renderer_host/native_web_keyboard_event_gtk.cc3
-rw-r--r--content/browser/renderer_host/native_web_keyboard_event_mac.mm4
-rw-r--r--content/browser/renderer_host/native_web_keyboard_event_win.cc4
-rw-r--r--content/browser/renderer_host/render_view_host_impl.cc1
-rw-r--r--content/browser/renderer_host/render_view_host_impl.h2
-rw-r--r--content/browser/renderer_host/render_widget_host_delegate.h4
-rw-r--r--content/browser/renderer_host/render_widget_host_unittest.cc1
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.cc1
-rw-r--r--content/browser/renderer_host/render_widget_host_view_gtk.cc1
-rw-r--r--content/browser/renderer_host/render_widget_host_view_gtk.h4
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac.h2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac.mm1
-rw-r--r--content/browser/renderer_host/render_widget_host_view_win.cc1
-rw-r--r--content/browser/renderer_host/test_render_view_host.cc1
-rw-r--r--content/browser/renderer_host/test_render_view_host.h2
-rw-r--r--content/browser/web_contents/interstitial_page_impl.cc1
-rw-r--r--content/browser/web_contents/interstitial_page_impl.h7
-rw-r--r--content/browser/web_contents/web_contents_impl.cc1
-rw-r--r--content/browser/web_contents/web_contents_impl.h7
-rw-r--r--content/port/browser/render_widget_host_view_port.h5
-rw-r--r--content/public/browser/native_web_keyboard_event.h4
-rw-r--r--content/public/browser/render_view_host_delegate.h2
-rw-r--r--content/public/browser/web_contents_delegate.h2
-rw-r--r--content/renderer/render_view_browsertest_mac.mm1
-rw-r--r--content/test/render_view_test.cc1
-rw-r--r--content/test/render_view_test.h2
33 files changed, 73 insertions, 27 deletions
diff --git a/content/browser/renderer_host/gtk_im_context_wrapper.cc b/content/browser/renderer_host/gtk_im_context_wrapper.cc
index 3bd7df8..b0c4ab4 100644
--- a/content/browser/renderer_host/gtk_im_context_wrapper.cc
+++ b/content/browser/renderer_host/gtk_im_context_wrapper.cc
@@ -21,6 +21,7 @@
#include "ui/gfx/gtk_util.h"
#include "ui/gfx/rect.h"
+using content::NativeWebKeyboardEvent;
using content::RenderWidgetHostImpl;
namespace {
diff --git a/content/browser/renderer_host/gtk_im_context_wrapper.h b/content/browser/renderer_host/gtk_im_context_wrapper.h
index 701d3ac..bb67379 100644
--- a/content/browser/renderer_host/gtk_im_context_wrapper.h
+++ b/content/browser/renderer_host/gtk_im_context_wrapper.h
@@ -17,15 +17,18 @@
#include "ui/base/ime/composition_text.h"
#include "ui/base/ime/text_input_type.h"
-namespace gfx {
-class Rect;
-}
-
class RenderWidgetHostViewGtk;
-struct NativeWebKeyboardEvent;
typedef struct _GtkIMContext GtkIMContext;
typedef struct _GtkWidget GtkWidget;
+namespace content {
+struct NativeWebKeyboardEvent;
+}
+
+namespace gfx {
+class Rect;
+}
+
// This class is a convenience wrapper for GtkIMContext.
// It creates and manages two GtkIMContext instances, one is GtkIMMulticontext,
// for plain text input box, another is GtkIMContextSimple, for password input
@@ -66,8 +69,8 @@ class GtkIMContextWrapper {
// Check if the input method returned any result, eg. preedit and commit text.
bool HasInputMethodResult() const;
- void ProcessFilteredKeyPressEvent(NativeWebKeyboardEvent* wke);
- void ProcessUnfilteredKeyPressEvent(NativeWebKeyboardEvent* wke);
+ void ProcessFilteredKeyPressEvent(content::NativeWebKeyboardEvent* wke);
+ void ProcessUnfilteredKeyPressEvent(content::NativeWebKeyboardEvent* wke);
// Processes result returned from input method after filtering a key event.
// |filtered| indicates if the key event was filtered by the input method.
diff --git a/content/browser/renderer_host/gtk_key_bindings_handler.cc b/content/browser/renderer_host/gtk_key_bindings_handler.cc
index 024ce42..d225fb6 100644
--- a/content/browser/renderer_host/gtk_key_bindings_handler.cc
+++ b/content/browser/renderer_host/gtk_key_bindings_handler.cc
@@ -12,6 +12,8 @@
#include "base/string_util.h"
#include "content/public/browser/native_web_keyboard_event.h"
+using content::NativeWebKeyboardEvent;
+
GtkKeyBindingsHandler::GtkKeyBindingsHandler(GtkWidget* parent_widget)
: handler_(CreateNewHandler()) {
DCHECK(GTK_IS_FIXED(parent_widget));
diff --git a/content/browser/renderer_host/gtk_key_bindings_handler.h b/content/browser/renderer_host/gtk_key_bindings_handler.h
index 665241b..ccdd02f 100644
--- a/content/browser/renderer_host/gtk_key_bindings_handler.h
+++ b/content/browser/renderer_host/gtk_key_bindings_handler.h
@@ -14,7 +14,9 @@
#include "content/common/content_export.h"
#include "ui/base/gtk/owned_widget_gtk.h"
+namespace content {
struct NativeWebKeyboardEvent;
+}
// This class is a convenience class for handling editor key bindings defined
// in gtk keyboard theme.
@@ -43,7 +45,8 @@ class CONTENT_EXPORT GtkKeyBindingsHandler {
// Matches a key event against predefined gtk key bindings, false will be
// returned if the key event doesn't correspond to a predefined key binding.
// Edit commands matched with |wke| will be stored in |edit_commands|.
- bool Match(const NativeWebKeyboardEvent& wke, EditCommands* edit_commands);
+ bool Match(const content::NativeWebKeyboardEvent& wke,
+ EditCommands* edit_commands);
private:
// Object structure of Handler class, which is derived from GtkTextView.
diff --git a/content/browser/renderer_host/gtk_key_bindings_handler_unittest.cc b/content/browser/renderer_host/gtk_key_bindings_handler_unittest.cc
index 09d2c61..9c92e62 100644
--- a/content/browser/renderer_host/gtk_key_bindings_handler_unittest.cc
+++ b/content/browser/renderer_host/gtk_key_bindings_handler_unittest.cc
@@ -19,6 +19,8 @@
#include "content/public/common/content_paths.h"
#include "testing/gtest/include/gtest/gtest.h"
+using content::NativeWebKeyboardEvent;
+
class GtkKeyBindingsHandlerTest : public testing::Test {
protected:
struct EditCommand {
diff --git a/content/browser/renderer_host/native_web_keyboard_event_android.cc b/content/browser/renderer_host/native_web_keyboard_event_android.cc
index 2dfb7f2..4ddc7f3 100644
--- a/content/browser/renderer_host/native_web_keyboard_event_android.cc
+++ b/content/browser/renderer_host/native_web_keyboard_event_android.cc
@@ -24,6 +24,8 @@ void DeleteGlobalRefForKeyEvent(jobject key_event) {
}
+namespace content {
+
NativeWebKeyboardEvent::NativeWebKeyboardEvent()
: os_event(NULL),
skip_in_browser(false) {
@@ -71,3 +73,5 @@ NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=(
NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
DeleteGlobalRefForKeyEvent(os_event);
}
+
+} // namespace content
diff --git a/content/browser/renderer_host/native_web_keyboard_event_aura.cc b/content/browser/renderer_host/native_web_keyboard_event_aura.cc
index db3765c..1c8b503 100644
--- a/content/browser/renderer_host/native_web_keyboard_event_aura.cc
+++ b/content/browser/renderer_host/native_web_keyboard_event_aura.cc
@@ -30,6 +30,8 @@ int EventFlagsToWebInputEventModifiers(int flags) {
using WebKit::WebKeyboardEvent;
+namespace content {
+
NativeWebKeyboardEvent::NativeWebKeyboardEvent()
: os_event(NULL),
skip_in_browser(false) {
@@ -91,3 +93,5 @@ NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=(
NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
delete os_event;
}
+
+} // namespace content
diff --git a/content/browser/renderer_host/native_web_keyboard_event_gtk.cc b/content/browser/renderer_host/native_web_keyboard_event_gtk.cc
index 198d92c..5aee868 100644
--- a/content/browser/renderer_host/native_web_keyboard_event_gtk.cc
+++ b/content/browser/renderer_host/native_web_keyboard_event_gtk.cc
@@ -23,6 +23,7 @@ void FreeEvent(gfx::NativeEvent event) {
} // namespace
+namespace content {
NativeWebKeyboardEvent::NativeWebKeyboardEvent()
: os_event(NULL),
@@ -72,3 +73,5 @@ NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=(
NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
FreeEvent(os_event);
}
+
+} // namespace content
diff --git a/content/browser/renderer_host/native_web_keyboard_event_mac.mm b/content/browser/renderer_host/native_web_keyboard_event_mac.mm
index 17d7de8..f2c8bbd 100644
--- a/content/browser/renderer_host/native_web_keyboard_event_mac.mm
+++ b/content/browser/renderer_host/native_web_keyboard_event_mac.mm
@@ -10,6 +10,8 @@
using WebKit::WebInputEventFactory;
+namespace content {
+
NativeWebKeyboardEvent::NativeWebKeyboardEvent()
: os_event(NULL),
skip_in_browser(false) {
@@ -54,3 +56,5 @@ NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=(
NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
[os_event release];
}
+
+} // namespace content
diff --git a/content/browser/renderer_host/native_web_keyboard_event_win.cc b/content/browser/renderer_host/native_web_keyboard_event_win.cc
index d72bb52..795c210 100644
--- a/content/browser/renderer_host/native_web_keyboard_event_win.cc
+++ b/content/browser/renderer_host/native_web_keyboard_event_win.cc
@@ -9,6 +9,8 @@
using WebKit::WebInputEventFactory;
using WebKit::WebKeyboardEvent;
+namespace content {
+
NativeWebKeyboardEvent::NativeWebKeyboardEvent()
: skip_in_browser(false) {
memset(&os_event, 0, sizeof(os_event));
@@ -44,3 +46,5 @@ NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=(
NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
// Noop under windows
}
+
+} // namespace content
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 9ca385b..ab06cd6 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -68,6 +68,7 @@
#include "webkit/glue/webdropdata.h"
using base::TimeDelta;
+using content::NativeWebKeyboardEvent;
using WebKit::WebConsoleMessage;
using WebKit::WebDragOperation;
using WebKit::WebDragOperationNone;
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index 62bb3ed..82c4643 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -371,7 +371,7 @@ class CONTENT_EXPORT RenderViewHostImpl
const WebKit::WebMouseEvent& mouse_event) OVERRIDE;
virtual void OnMouseActivate() OVERRIDE;
virtual void ForwardKeyboardEvent(
- const NativeWebKeyboardEvent& key_event) OVERRIDE;
+ const content::NativeWebKeyboardEvent& key_event) OVERRIDE;
virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE;
// Creates a new RenderView with the given route id.
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
index 768d6df..0e72068 100644
--- a/content/browser/renderer_host/render_widget_host_delegate.h
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
@@ -8,10 +8,10 @@
#include "content/common/content_export.h"
-struct NativeWebKeyboardEvent;
-
namespace content {
+struct NativeWebKeyboardEvent;
+
//
// RenderWidgetHostDelegate
//
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index dce2bb1..b6b18c7 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -31,6 +31,7 @@ using base::TimeDelta;
using content::BrowserThread;
using content::BrowserThreadImpl;
using content::MockRenderProcessHost;
+using content::NativeWebKeyboardEvent;
using content::RenderWidgetHost;
using content::RenderWidgetHostImpl;
using WebKit::WebInputEvent;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 277dce6..e2d49c4 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -41,6 +41,7 @@
#include "ui/gfx/skia_util.h"
using content::BrowserThread;
+using content::NativeWebKeyboardEvent;
using content::RenderWidgetHost;
using content::RenderWidgetHostImpl;
using content::RenderWidgetHostView;
diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.cc b/content/browser/renderer_host/render_widget_host_view_gtk.cc
index 7e93e84..852ed79d 100644
--- a/content/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/content/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -102,6 +102,7 @@ bool MovedToCenter(const WebKit::WebMouseEvent& mouse_event,
} // namespace
+using content::NativeWebKeyboardEvent;
using content::RenderWidgetHostImpl;
using content::RenderWidgetHostView;
using content::RenderWidgetHostViewPort;
diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.h b/content/browser/renderer_host/render_widget_host_view_gtk.h
index 8e3871d..c3d2cc2 100644
--- a/content/browser/renderer_host/render_widget_host_view_gtk.h
+++ b/content/browser/renderer_host/render_widget_host_view_gtk.h
@@ -28,11 +28,11 @@
#include "webkit/plugins/npapi/gtk_plugin_container_manager.h"
class GtkIMContextWrapper;
-struct NativeWebKeyboardEvent;
namespace content {
class RenderWidgetHost;
class RenderWidgetHostImpl;
+struct NativeWebKeyboardEvent;
}
class GtkKeyBindingsHandler;
@@ -145,7 +145,7 @@ class CONTENT_EXPORT RenderWidgetHostViewGtk
// calls GtkKeyBindingsHandler::Match() against the event and send matched
// edit commands to renderer by calling
// RenderWidgetHost::ForwardEditCommandsForNextKeyEvent().
- void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event);
+ void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& event);
bool RetrieveSurrounding(std::string* text, size_t* cursor_index);
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 54e96af..52d6e90 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -246,7 +246,7 @@ class RenderWidgetHostViewMac : public content::RenderWidgetHostViewBase {
virtual void PluginFocusChanged(bool focused, int plugin_id) OVERRIDE;
virtual void StartPluginIme() OVERRIDE;
virtual bool PostProcessEventForPluginIme(
- const NativeWebKeyboardEvent& event) OVERRIDE;
+ const content::NativeWebKeyboardEvent& event) OVERRIDE;
// Methods associated with GPU-accelerated plug-in instances and the
// accelerated compositor.
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 1d3ae76..9ba529f 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -55,6 +55,7 @@
#include "webkit/plugins/npapi/webplugin.h"
using content::BrowserThread;
+using content::NativeWebKeyboardEvent;
using content::RenderViewHostImpl;
using content::RenderWidgetHost;
using content::RenderWidgetHostImpl;
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index 5b844e2..6a0c5ae 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -67,6 +67,7 @@
using base::TimeDelta;
using base::TimeTicks;
using content::BrowserThread;
+using content::NativeWebKeyboardEvent;
using content::RenderWidgetHost;
using content::RenderWidgetHostImpl;
using content::RenderWidgetHostView;
diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc
index cd86819..fa00b6a 100644
--- a/content/browser/renderer_host/test_render_view_host.cc
+++ b/content/browser/renderer_host/test_render_view_host.cc
@@ -16,6 +16,7 @@
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webpreferences.h"
+using content::NativeWebKeyboardEvent;
using webkit::forms::PasswordForm;
namespace content {
diff --git a/content/browser/renderer_host/test_render_view_host.h b/content/browser/renderer_host/test_render_view_host.h
index db5cfb7..8a016fe 100644
--- a/content/browser/renderer_host/test_render_view_host.h
+++ b/content/browser/renderer_host/test_render_view_host.h
@@ -115,7 +115,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase {
virtual void PluginFocusChanged(bool focused, int plugin_id) OVERRIDE;
virtual void StartPluginIme() OVERRIDE;
virtual bool PostProcessEventForPluginIme(
- const NativeWebKeyboardEvent& event) OVERRIDE;
+ const content::NativeWebKeyboardEvent& event) OVERRIDE;
virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle(
bool opaque,
bool root) OVERRIDE;
diff --git a/content/browser/web_contents/interstitial_page_impl.cc b/content/browser/web_contents/interstitial_page_impl.cc
index a1c8eb3..dc59712 100644
--- a/content/browser/web_contents/interstitial_page_impl.cc
+++ b/content/browser/web_contents/interstitial_page_impl.cc
@@ -38,6 +38,7 @@
using content::BrowserThread;
using content::DomOperationNotificationDetails;
using content::InterstitialPageDelegate;
+using content::NativeWebKeyboardEvent;
using content::NavigationController;
using content::NavigationEntry;
using content::NavigationEntryImpl;
diff --git a/content/browser/web_contents/interstitial_page_impl.h b/content/browser/web_contents/interstitial_page_impl.h
index d4c6d15..a0ba9b6 100644
--- a/content/browser/web_contents/interstitial_page_impl.h
+++ b/content/browser/web_contents/interstitial_page_impl.h
@@ -102,10 +102,11 @@ class CONTENT_EXPORT InterstitialPageImpl
virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE;
// RenderWidgetHostDelegate implementation:
- virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
- bool* is_keyboard_shortcut) OVERRIDE;
+ virtual bool PreHandleKeyboardEvent(
+ const content::NativeWebKeyboardEvent& event,
+ bool* is_keyboard_shortcut) OVERRIDE;
virtual void HandleKeyboardEvent(
- const NativeWebKeyboardEvent& event) OVERRIDE;
+ const content::NativeWebKeyboardEvent& event) OVERRIDE;
bool enabled() const { return enabled_; }
content::WebContents* web_contents() const;
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 196095a..51f2576 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -134,6 +134,7 @@ using content::GlobalRequestID;
using content::HostZoomMap;
using content::InterstitialPage;
using content::LoadNotificationDetails;
+using content::NativeWebKeyboardEvent;
using content::NavigationController;
using content::NavigationEntry;
using content::NavigationEntryImpl;
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index f2213c1..26de0c3 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -354,10 +354,11 @@ class CONTENT_EXPORT WebContentsImpl
// RenderWidgetHostDelegate --------------------------------------------------
- virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
- bool* is_keyboard_shortcut) OVERRIDE;
+ virtual bool PreHandleKeyboardEvent(
+ const content::NativeWebKeyboardEvent& event,
+ bool* is_keyboard_shortcut) OVERRIDE;
virtual void HandleKeyboardEvent(
- const NativeWebKeyboardEvent& event) OVERRIDE;
+ const content::NativeWebKeyboardEvent& event) OVERRIDE;
// RenderViewHostManager::Delegate -------------------------------------------
diff --git a/content/port/browser/render_widget_host_view_port.h b/content/port/browser/render_widget_host_view_port.h
index 8ff0c5d..cf0269d 100644
--- a/content/port/browser/render_widget_host_view_port.h
+++ b/content/port/browser/render_widget_host_view_port.h
@@ -22,7 +22,10 @@ class WebCursor;
struct AccessibilityHostMsg_NotificationParams;
struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params;
+
+namespace content {
struct NativeWebKeyboardEvent;
+}
namespace webkit {
namespace npapi {
@@ -194,7 +197,7 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView {
// not enabled, this is a no-op, so it is always safe to call.
// Returns true if the event was handled by IME.
virtual bool PostProcessEventForPluginIme(
- const NativeWebKeyboardEvent& event) = 0;
+ const content::NativeWebKeyboardEvent& event) = 0;
// Methods associated with GPU-accelerated plug-in instances.
virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle(
diff --git a/content/public/browser/native_web_keyboard_event.h b/content/public/browser/native_web_keyboard_event.h
index 6414c66..c12387c 100644
--- a/content/public/browser/native_web_keyboard_event.h
+++ b/content/public/browser/native_web_keyboard_event.h
@@ -14,6 +14,8 @@
#include "ui/base/events.h"
#include "ui/gfx/native_widget_types.h"
+namespace content {
+
// Owns a platform specific event; used to pass own and pass event through
// platform independent code.
struct CONTENT_EXPORT NativeWebKeyboardEvent :
@@ -74,8 +76,6 @@ struct CONTENT_EXPORT NativeWebKeyboardEvent :
#endif
};
-namespace content {
-
// Returns a bitmak of values from ui/base/events.h.
CONTENT_EXPORT int GetModifiersFromNativeWebKeyboardEvent(
const NativeWebKeyboardEvent& event);
diff --git a/content/public/browser/render_view_host_delegate.h b/content/public/browser/render_view_host_delegate.h
index a024469..ec24279 100644
--- a/content/public/browser/render_view_host_delegate.h
+++ b/content/public/browser/render_view_host_delegate.h
@@ -26,7 +26,6 @@ class GURL;
class SkBitmap;
class WebContentsImpl;
class WebKeyboardEvent;
-struct NativeWebKeyboardEvent;
struct ViewHostMsg_CreateWindow_Params;
struct ViewHostMsg_DidFailProvisionalLoadWithError_Params;
struct ViewHostMsg_FrameNavigate_Params;
@@ -57,6 +56,7 @@ class WebContents;
struct ContextMenuParams;
struct FileChooserParams;
struct GlobalRequestID;
+struct NativeWebKeyboardEvent;
struct Referrer;
struct RendererPreferences;
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index ecfdb7a..a3e070b 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -22,7 +22,6 @@
class FilePath;
class GURL;
class WebContentsImpl;
-struct NativeWebKeyboardEvent;
namespace base {
class ListValue;
@@ -38,6 +37,7 @@ class WebContents;
class WebIntentsDispatcher;
struct ContextMenuParams;
struct FileChooserParams;
+struct NativeWebKeyboardEvent;
struct SSLStatus;
}
diff --git a/content/renderer/render_view_browsertest_mac.mm b/content/renderer/render_view_browsertest_mac.mm
index e2d28a7..3860449 100644
--- a/content/renderer/render_view_browsertest_mac.mm
+++ b/content/renderer/render_view_browsertest_mac.mm
@@ -12,6 +12,7 @@
#include <Cocoa/Cocoa.h>
#include <Carbon/Carbon.h> // for the kVK_* constants.
+using content::NativeWebKeyboardEvent;
using content::RenderViewTest;
NSEvent* CmdDeadKeyEvent(NSEventType type, unsigned short code) {
diff --git a/content/test/render_view_test.cc b/content/test/render_view_test.cc
index a7d2018b..4df47e6 100644
--- a/content/test/render_view_test.cc
+++ b/content/test/render_view_test.cc
@@ -44,6 +44,7 @@ using WebKit::WebScriptController;
using WebKit::WebScriptSource;
using WebKit::WebString;
using WebKit::WebURLRequest;
+using content::NativeWebKeyboardEvent;
namespace {
const int32 kOpenerId = -2;
diff --git a/content/test/render_view_test.h b/content/test/render_view_test.h
index 8018da6..75fa5a4 100644
--- a/content/test/render_view_test.h
+++ b/content/test/render_view_test.h
@@ -80,7 +80,7 @@ class RenderViewTest : public testing::Test {
string16* output);
// Sends one native key event over IPC.
- void SendNativeKeyEvent(const NativeWebKeyboardEvent& key_event);
+ void SendNativeKeyEvent(const content::NativeWebKeyboardEvent& key_event);
// Send a raw keyboard event to the renderer.
void SendWebKeyboardEvent(const WebKit::WebKeyboardEvent& key_event);