diff options
Diffstat (limited to 'content/browser')
26 files changed, 62 insertions, 21 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 ------------------------------------------- |