Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / automation / automation_window_tracker.cc
blob0cb28e3c53642bd93ef16149c8cc4ef9bb279f76
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/automation/automation_window_tracker.h"
7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/native_window_notification_source.h"
10 AutomationWindowTracker::AutomationWindowTracker(IPC::Sender* automation)
11 : AutomationResourceTracker<gfx::NativeWindow>(automation) {
14 AutomationWindowTracker::~AutomationWindowTracker() {
17 void AutomationWindowTracker::AddObserver(gfx::NativeWindow resource) {
18 registrar_.Add(this, chrome::NOTIFICATION_WINDOW_CLOSED,
19 content::Source<gfx::NativeWindow>(resource));
22 void AutomationWindowTracker::RemoveObserver(gfx::NativeWindow resource) {
23 registrar_.Remove(this, chrome::NOTIFICATION_WINDOW_CLOSED,
24 content::Source<gfx::NativeWindow>(resource));