| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/gtk/options/content_exceptions_window_gtk.h" | 5 #include "chrome/browser/gtk/options/content_exceptions_window_gtk.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 } // namespace | 36 } // namespace |
| 37 | 37 |
| 38 // static | 38 // static |
| 39 void ContentExceptionsWindowGtk::ShowExceptionsWindow( | 39 void ContentExceptionsWindowGtk::ShowExceptionsWindow( |
| 40 GtkWindow* parent, | 40 GtkWindow* parent, |
| 41 HostContentSettingsMap* map, | 41 HostContentSettingsMap* map, |
| 42 ContentSettingsType type) { | 42 ContentSettingsType type) { |
| 43 DCHECK(map); | 43 DCHECK(map); |
| 44 DCHECK(type < CONTENT_SETTINGS_NUM_TYPES); | 44 DCHECK(type < CONTENT_SETTINGS_NUM_TYPES); |
| 45 // TODO(joth): remove once fully implemented. |
| 46 DCHECK(type != CONTENT_SETTINGS_TYPE_GEOLOCATION); |
| 45 | 47 |
| 46 if (!instances[type]) { | 48 if (!instances[type]) { |
| 47 // Create the options window. | 49 // Create the options window. |
| 48 instances[type] = new ContentExceptionsWindowGtk(parent, map, type); | 50 instances[type] = new ContentExceptionsWindowGtk(parent, map, type); |
| 49 } | 51 } |
| 50 } | 52 } |
| 51 | 53 |
| 52 ContentExceptionsWindowGtk::~ContentExceptionsWindowGtk() { | 54 ContentExceptionsWindowGtk::~ContentExceptionsWindowGtk() { |
| 53 } | 55 } |
| 54 | 56 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 instances[window->model_->content_type()] = NULL; | 258 instances[window->model_->content_type()] = NULL; |
| 257 MessageLoop::current()->DeleteSoon(FROM_HERE, window); | 259 MessageLoop::current()->DeleteSoon(FROM_HERE, window); |
| 258 } | 260 } |
| 259 | 261 |
| 260 // static | 262 // static |
| 261 void ContentExceptionsWindowGtk::OnSelectionChanged( | 263 void ContentExceptionsWindowGtk::OnSelectionChanged( |
| 262 GtkTreeSelection* selection, | 264 GtkTreeSelection* selection, |
| 263 ContentExceptionsWindowGtk* window) { | 265 ContentExceptionsWindowGtk* window) { |
| 264 window->UpdateButtonState(); | 266 window->UpdateButtonState(); |
| 265 } | 267 } |
| OLD | NEW |