summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/extension_input_api.cc5
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_views_touch.cc16
-rw-r--r--chrome/browser/ui/touch/frame/touch_browser_frame_view.cc27
-rw-r--r--chrome/browser/ui/views/frame/browser_root_view.cc3
4 files changed, 27 insertions, 24 deletions
diff --git a/chrome/browser/extensions/extension_input_api.cc b/chrome/browser/extensions/extension_input_api.cc
index 883437e..9fa4585 100644
--- a/chrome/browser/extensions/extension_input_api.cc
+++ b/chrome/browser/extensions/extension_input_api.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/common/chrome_notification_types.h"
#include "views/events/event.h"
#include "views/ime/input_method.h"
#include "views/widget/widget.h"
@@ -137,7 +138,7 @@ bool SendKeyboardEventInputFunction::RunImpl() {
#if defined(TOUCH_UI)
bool HideKeyboardFunction::RunImpl() {
NotificationService::current()->Notify(
- chrome::HIDE_KEYBOARD_INVOKED,
+ chrome::NOTIFICATION_HIDE_KEYBOARD_INVOKED,
Source<HideKeyboardFunction>(this),
NotificationService::NoDetails());
return true;
@@ -156,7 +157,7 @@ bool SetKeyboardHeightFunction::RunImpl() {
// and set the height of virtual keyboard directly instead of using
// notification.
NotificationService::current()->Notify(
- chrome::SET_KEYBOARD_HEIGHT_INVOKED,
+ chrome::NOTIFICATION_SET_KEYBOARD_HEIGHT_INVOKED,
Source<SetKeyboardHeightFunction>(this),
Details<int>(&height));
return true;
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views_touch.cc b/chrome/browser/renderer_host/render_widget_host_view_views_touch.cc
index 08e2656..94f382f 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views_touch.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_views_touch.cc
@@ -18,19 +18,19 @@ using WebKit::WebTouchEvent;
namespace {
-WebKit::WebTouchPocontent::NOTIFICATION_State TouchPointStateFromEvent(
+WebKit::WebTouchPoint::State TouchPointStateFromEvent(
const views::TouchEvent* event) {
switch (event->type()) {
case ui::ET_TOUCH_PRESSED:
- return WebKit::WebTouchPocontent::NOTIFICATION_StatePressed;
+ return WebKit::WebTouchPoint::StatePressed;
case ui::ET_TOUCH_RELEASED:
- return WebKit::WebTouchPocontent::NOTIFICATION_StateReleased;
+ return WebKit::WebTouchPoint::StateReleased;
case ui::ET_TOUCH_MOVED:
- return WebKit::WebTouchPocontent::NOTIFICATION_StateMoved;
+ return WebKit::WebTouchPoint::StateMoved;
case ui::ET_TOUCH_CANCELLED:
- return WebKit::WebTouchPocontent::NOTIFICATION_StateCancelled;
+ return WebKit::WebTouchPoint::StateCancelled;
default:
- return WebKit::WebTouchPocontent::NOTIFICATION_StateUndefined;
+ return WebKit::WebTouchPoint::StateUndefined;
}
}
@@ -138,7 +138,7 @@ ui::TouchStatus RenderWidgetHostViewViews::OnTouchEvent(
// Update the location and state of the point.
point->state = TouchPointStateFromEvent(&event);
- if (point->state == WebKit::WebTouchPocontent::NOTIFICATION_StateMoved) {
+ if (point->state == WebKit::WebTouchPoint::StateMoved) {
// It is possible for badly written touch drivers to emit Move events even
// when the touch location hasn't changed. In such cases, consume the event
// and pretend nothing happened.
@@ -152,7 +152,7 @@ ui::TouchStatus RenderWidgetHostViewViews::OnTouchEvent(
for (int i = 0; i < touch_event_.touchPointsLength; ++i) {
WebKit::WebTouchPoint* iter = touch_event_.touchPoints + i;
if (iter != point) {
- iter->state = WebKit::WebTouchPocontent::NOTIFICATION_StateStationary;
+ iter->state = WebKit::WebTouchPoint::StateStationary;
}
}
diff --git a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
index 897d9cf..b1ae5b4 100644
--- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
+++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/ui/touch/frame/keyboard_container_view.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/tab_contents/tab_contents_view_touch.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
@@ -62,22 +63,22 @@ TouchBrowserFrameView::TouchBrowserFrameView(BrowserFrame* frame,
focus_listener_added_(false),
keyboard_(NULL) {
registrar_.Add(this,
- chrome::NAV_ENTRY_COMMITTED,
+ content::NOTIFICATION_NAV_ENTRY_COMMITTED,
NotificationService::AllSources());
registrar_.Add(this,
- chrome::FOCUS_CHANGED_IN_PAGE,
+ content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
NotificationService::AllSources());
registrar_.Add(this,
- chrome::TAB_CONTENTS_DESTROYED,
+ content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
NotificationService::AllSources());
registrar_.Add(this,
- chrome::HIDE_KEYBOARD_INVOKED,
+ chrome::NOTIFICATION_HIDE_KEYBOARD_INVOKED,
NotificationService::AllSources());
registrar_.Add(this,
- chrome::SET_KEYBOARD_HEIGHT_INVOKED,
+ chrome::NOTIFICATION_SET_KEYBOARD_HEIGHT_INVOKED,
NotificationService::AllSources());
registrar_.Add(this,
- chrome::EDITABLE_ELEMENT_TOUCHED,
+ chrome::NOTIFICATION_EDITABLE_ELEMENT_TOUCHED,
NotificationService::AllSources());
browser_view->browser()->tabstrip_model()->AddObserver(this);
@@ -264,7 +265,7 @@ void TouchBrowserFrameView::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
Browser* browser = browser_view()->browser();
- if (type == chrome::FOCUS_CHANGED_IN_PAGE) {
+ if (type == content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE) {
// Only modify the keyboard state if the currently active tab sent the
// notification.
const TabContents* current_tab = browser->GetSelectedTabContents();
@@ -278,7 +279,7 @@ void TouchBrowserFrameView::Observe(int type,
// can be determined after tab switching.
GetFocusedStateAccessor()->SetProperty(
source_tab->property_bag(), editable);
- } else if (type == chrome::NAV_ENTRY_COMMITTED) {
+ } else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
NavigationController* controller =
Source<NavigationController>(source).ptr();
Browser* source_browser = Browser::GetBrowserForController(
@@ -299,12 +300,12 @@ void TouchBrowserFrameView::Observe(int type,
}
if (source_browser == browser)
UpdateKeyboardAndLayout(keyboard_type == GENERIC);
- } else if (type == chrome::TAB_CONTENTS_DESTROYED) {
+ } else if (type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED) {
GetFocusedStateAccessor()->DeleteProperty(
Source<TabContents>(source).ptr()->property_bag());
- } else if (type == chrome::PREF_CHANGED) {
+ } else if (type == chrome::NOTIFICATION_PREF_CHANGED) {
OpaqueBrowserFrameView::Observe(type, source, details);
- } else if (type == chrome::HIDE_KEYBOARD_INVOKED) {
+ } else if (type == chrome::NOTIFICATION_HIDE_KEYBOARD_INVOKED) {
TabContents* tab_contents =
browser_view()->browser()->GetSelectedTabContents();
if (tab_contents) {
@@ -312,7 +313,7 @@ void TouchBrowserFrameView::Observe(int type,
false);
}
UpdateKeyboardAndLayout(false);
- } else if (type == chrome::SET_KEYBOARD_HEIGHT_INVOKED) {
+ } else if (type == chrome::NOTIFICATION_SET_KEYBOARD_HEIGHT_INVOKED) {
// TODO(penghuang) Allow extension conrtol the virtual keyboard directly
// instead of using Notification.
int height = *reinterpret_cast<int*>(details.map_key());
@@ -323,7 +324,7 @@ void TouchBrowserFrameView::Observe(int type,
keyboard_height_ = height;
parent()->Layout();
}
- } else if (type == chrome::EDITABLE_ELEMENT_TOUCHED) {
+ } else if (type == chrome::NOTIFICATION_EDITABLE_ELEMENT_TOUCHED) {
UpdateKeyboardAndLayout(true);
}
}
diff --git a/chrome/browser/ui/views/frame/browser_root_view.cc b/chrome/browser/ui/views/frame/browser_root_view.cc
index 49d2fbe..fa2b9f1 100644
--- a/chrome/browser/ui/views/frame/browser_root_view.cc
+++ b/chrome/browser/ui/views/frame/browser_root_view.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/views/frame/browser_frame.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
+#include "chrome/common/chrome_notification_types.h"
#include "grit/chromium_strings.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/dragdrop/drag_drop_types.h"
@@ -48,7 +49,7 @@ ui::TouchStatus BrowserRootView::OnTouchEvent(const views::TouchEvent& event) {
ui::TextInputType text_input_type = input_method->GetTextInputType();
if (text_input_type != ui::TEXT_INPUT_TYPE_NONE) {
NotificationService::current()->Notify(
- chrome::EDITABLE_ELEMENT_TOUCHED,
+ chrome::NOTIFICATION_EDITABLE_ELEMENT_TOUCHED,
Source<View>(this),
Details<ui::TextInputType>(&text_input_type));
}