Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7830)

Unified Diff: chrome/browser/ui/touch/frame/touch_browser_frame_view.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
===================================================================
--- chrome/browser/ui/touch/frame/touch_browser_frame_view.cc (revision 91968)
+++ chrome/browser/ui/touch/frame/touch_browser_frame_view.cc (working copy)
@@ -16,8 +16,8 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/common/content_notification_types.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_type.h"
#include "content/common/view_messages.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/gfx/rect.h"
@@ -62,22 +62,22 @@
focus_listener_added_(false),
keyboard_(NULL) {
registrar_.Add(this,
- NotificationType::NAV_ENTRY_COMMITTED,
+ chrome::NAV_ENTRY_COMMITTED,
NotificationService::AllSources());
registrar_.Add(this,
- NotificationType::FOCUS_CHANGED_IN_PAGE,
+ chrome::FOCUS_CHANGED_IN_PAGE,
NotificationService::AllSources());
registrar_.Add(this,
- NotificationType::TAB_CONTENTS_DESTROYED,
+ chrome::TAB_CONTENTS_DESTROYED,
NotificationService::AllSources());
registrar_.Add(this,
- NotificationType::HIDE_KEYBOARD_INVOKED,
+ chrome::HIDE_KEYBOARD_INVOKED,
NotificationService::AllSources());
registrar_.Add(this,
- NotificationType::SET_KEYBOARD_HEIGHT_INVOKED,
+ chrome::SET_KEYBOARD_HEIGHT_INVOKED,
NotificationService::AllSources());
registrar_.Add(this,
- NotificationType::EDITABLE_ELEMENT_TOUCHED,
+ chrome::EDITABLE_ELEMENT_TOUCHED,
NotificationService::AllSources());
browser_view->browser()->tabstrip_model()->AddObserver(this);
@@ -260,11 +260,11 @@
}
}
-void TouchBrowserFrameView::Observe(NotificationType type,
+void TouchBrowserFrameView::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
Browser* browser = browser_view()->browser();
- if (type == NotificationType::FOCUS_CHANGED_IN_PAGE) {
+ if (type == chrome::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 +278,7 @@
// can be determined after tab switching.
GetFocusedStateAccessor()->SetProperty(
source_tab->property_bag(), editable);
- } else if (type == NotificationType::NAV_ENTRY_COMMITTED) {
+ } else if (type == chrome::NAV_ENTRY_COMMITTED) {
NavigationController* controller =
Source<NavigationController>(source).ptr();
Browser* source_browser = Browser::GetBrowserForController(
@@ -299,12 +299,12 @@
}
if (source_browser == browser)
UpdateKeyboardAndLayout(keyboard_type == GENERIC);
- } else if (type == NotificationType::TAB_CONTENTS_DESTROYED) {
+ } else if (type == chrome::TAB_CONTENTS_DESTROYED) {
GetFocusedStateAccessor()->DeleteProperty(
Source<TabContents>(source).ptr()->property_bag());
- } else if (type == NotificationType::PREF_CHANGED) {
+ } else if (type == chrome::PREF_CHANGED) {
OpaqueBrowserFrameView::Observe(type, source, details);
- } else if (type == NotificationType::HIDE_KEYBOARD_INVOKED) {
+ } else if (type == chrome::HIDE_KEYBOARD_INVOKED) {
TabContents* tab_contents =
browser_view()->browser()->GetSelectedTabContents();
if (tab_contents) {
@@ -312,7 +312,7 @@
false);
}
UpdateKeyboardAndLayout(false);
- } else if (type == NotificationType::SET_KEYBOARD_HEIGHT_INVOKED) {
+ } else if (type == chrome::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 +323,7 @@
keyboard_height_ = height;
parent()->Layout();
}
- } else if (type == NotificationType::EDITABLE_ELEMENT_TOUCHED) {
+ } else if (type == chrome::EDITABLE_ELEMENT_TOUCHED) {
UpdateKeyboardAndLayout(true);
}
}
« no previous file with comments | « chrome/browser/ui/touch/frame/touch_browser_frame_view.h ('k') | chrome/browser/ui/views/accessibility_event_router_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698