Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include <dlfcn.h> | 9 #include <dlfcn.h> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1256 switch (type) { | 1256 switch (type) { |
| 1257 case chrome::NOTIFICATION_PREF_CHANGED: { | 1257 case chrome::NOTIFICATION_PREF_CHANGED: { |
| 1258 std::string* pref_name = content::Details<std::string>(details).ptr(); | 1258 std::string* pref_name = content::Details<std::string>(details).ptr(); |
| 1259 if (*pref_name == prefs::kUseCustomChromeFrame) { | 1259 if (*pref_name == prefs::kUseCustomChromeFrame) { |
| 1260 UpdateCustomFrame(); | 1260 UpdateCustomFrame(); |
| 1261 } else { | 1261 } else { |
| 1262 NOTREACHED() << "Got pref change notification we didn't register for!"; | 1262 NOTREACHED() << "Got pref change notification we didn't register for!"; |
| 1263 } | 1263 } |
| 1264 break; | 1264 break; |
| 1265 } | 1265 } |
| 1266 | |
| 1267 default: | |
|
Evan Stade
2012/02/01 22:19:02
I don't understand why you are deleting this check
prasadt
2012/02/01 22:40:31
This method is now overridden in PanelBrowserWindo
| |
| 1268 NOTREACHED() << "Got a notification we didn't register for!"; | |
| 1269 } | 1266 } |
| 1270 } | 1267 } |
| 1271 | 1268 |
| 1272 void BrowserWindowGtk::TabDetachedAt(TabContentsWrapper* contents, int index) { | 1269 void BrowserWindowGtk::TabDetachedAt(TabContentsWrapper* contents, int index) { |
| 1273 // We use index here rather than comparing |contents| because by this time | 1270 // We use index here rather than comparing |contents| because by this time |
| 1274 // the model has already removed |contents| from its list, so | 1271 // the model has already removed |contents| from its list, so |
| 1275 // browser_->GetSelectedWebContents() will return NULL or something else. | 1272 // browser_->GetSelectedWebContents() will return NULL or something else. |
| 1276 if (index == browser_->tabstrip_model()->active_index()) { | 1273 if (index == browser_->tabstrip_model()->active_index()) { |
| 1277 infobar_container_->ChangeTabContents(NULL); | 1274 infobar_container_->ChangeTabContents(NULL); |
| 1278 UpdateDevToolsForContents(NULL); | 1275 UpdateDevToolsForContents(NULL); |
| (...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2520 wm_type == ui::WM_OPENBOX || | 2517 wm_type == ui::WM_OPENBOX || |
| 2521 wm_type == ui::WM_XFWM4); | 2518 wm_type == ui::WM_XFWM4); |
| 2522 } | 2519 } |
| 2523 | 2520 |
| 2524 // static | 2521 // static |
| 2525 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2522 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2526 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2523 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2527 browser_window_gtk->Init(); | 2524 browser_window_gtk->Init(); |
| 2528 return browser_window_gtk; | 2525 return browser_window_gtk; |
| 2529 } | 2526 } |
| OLD | NEW |