projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git]
/
src
/
chrome
/
browser
/
extensions
/
api
/
tabs
/
windows_event_router.cc
diff --git
a/src/chrome/browser/extensions/api/tabs/windows_event_router.cc
b/src/chrome/browser/extensions/api/tabs/windows_event_router.cc
index
e3d2113
..
a24d500
100644
(file)
--- a/
src/chrome/browser/extensions/api/tabs/windows_event_router.cc
+++ b/
src/chrome/browser/extensions/api/tabs/windows_event_router.cc
@@
-15,11
+15,6
@@
#include "chrome/common/extensions/extension_constants.h"
#include "content/public/browser/notification_service.h"
#include "extensions/browser/event_router.h"
#include "chrome/common/extensions/extension_constants.h"
#include "content/public/browser/notification_service.h"
#include "extensions/browser/event_router.h"
-#include "extensions/browser/extension_system.h"
-
-#if defined(TOOLKIT_GTK)
-#include "ui/base/x/active_window_watcher_x.h"
-#endif
using content::BrowserContext;
using content::BrowserContext;
@@
-36,8
+31,6
@@
WindowsEventRouter::WindowsEventRouter(Profile* profile)
WindowControllerList::GetInstance()->AddObserver(this);
#if defined(TOOLKIT_VIEWS)
views::WidgetFocusManager::GetInstance()->AddFocusChangeListener(this);
WindowControllerList::GetInstance()->AddObserver(this);
#if defined(TOOLKIT_VIEWS)
views::WidgetFocusManager::GetInstance()->AddFocusChangeListener(this);
-#elif defined(TOOLKIT_GTK)
- ui::ActiveWindowWatcherX::AddObserver(this);
#elif defined(OS_MACOSX)
// Needed for when no suitable window can be passed to an extension as the
// currently focused window.
#elif defined(OS_MACOSX)
// Needed for when no suitable window can be passed to an extension as the
// currently focused window.
@@
-50,8
+43,6
@@
WindowsEventRouter::~WindowsEventRouter() {
WindowControllerList::GetInstance()->RemoveObserver(this);
#if defined(TOOLKIT_VIEWS)
views::WidgetFocusManager::GetInstance()->RemoveFocusChangeListener(this);
WindowControllerList::GetInstance()->RemoveObserver(this);
#if defined(TOOLKIT_VIEWS)
views::WidgetFocusManager::GetInstance()->RemoveFocusChangeListener(this);
-#elif defined(TOOLKIT_GTK)
- ui::ActiveWindowWatcherX::RemoveObserver(this);
#endif
}
#endif
}
@@
-88,12
+79,6
@@
void WindowsEventRouter::OnNativeFocusChange(
if (!focused_now)
OnActiveWindowChanged(NULL);
}
if (!focused_now)
OnActiveWindowChanged(NULL);
}
-#elif defined(TOOLKIT_GTK)
-void WindowsEventRouter::ActiveWindowChanged(
- GdkWindow* active_window) {
- if (!active_window)
- OnActiveWindowChanged(NULL);
-}
#endif
void WindowsEventRouter::Observe(
#endif
void WindowsEventRouter::Observe(
@@
-152,7
+137,7
@@
void WindowsEventRouter::OnActiveWindowChanged(
base::Bind(&WillDispatchWindowFocusedEvent,
static_cast<BrowserContext*>(window_profile),
window_id);
base::Bind(&WillDispatchWindowFocusedEvent,
static_cast<BrowserContext*>(window_profile),
window_id);
- E
xtensionSystem::Get(profile_)->event_router(
)->BroadcastEvent(event.Pass());
+ E
ventRouter::Get(profile_
)->BroadcastEvent(event.Pass());
}
void WindowsEventRouter::DispatchEvent(const std::string& event_name,
}
void WindowsEventRouter::DispatchEvent(const std::string& event_name,
@@
-160,7
+145,7
@@
void WindowsEventRouter::DispatchEvent(const std::string& event_name,
scoped_ptr<base::ListValue> args) {
scoped_ptr<Event> event(new Event(event_name, args.Pass()));
event->restrict_to_browser_context = profile;
scoped_ptr<base::ListValue> args) {
scoped_ptr<Event> event(new Event(event_name, args.Pass()));
event->restrict_to_browser_context = profile;
- E
xtensionSystem::Get(profile)->event_router(
)->BroadcastEvent(event.Pass());
+ E
ventRouter::Get(profile
)->BroadcastEvent(event.Pass());
}
} // namespace extensions
}
} // namespace extensions