OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1249 UpdateDevToolsForContents(NULL); | 1249 UpdateDevToolsForContents(NULL); |
1250 } | 1250 } |
1251 contents_container_->DetachTab(contents); | 1251 contents_container_->DetachTab(contents); |
1252 } | 1252 } |
1253 | 1253 |
1254 void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents, | 1254 void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents, |
1255 TabContentsWrapper* new_contents, | 1255 TabContentsWrapper* new_contents, |
1256 int index, | 1256 int index, |
1257 bool user_gesture) { | 1257 bool user_gesture) { |
1258 TRACE_EVENT0("ui::gtk", "BrowserWindowGtk::ActiveTabChanged"); | 1258 TRACE_EVENT0("ui::gtk", "BrowserWindowGtk::ActiveTabChanged"); |
1259 if (old_contents && !old_contents->tab_contents()->is_being_destroyed()) | 1259 if (old_contents && !old_contents->tab_contents()->IsBeingDestroyed()) |
1260 old_contents->tab_contents()->GetView()->StoreFocus(); | 1260 old_contents->tab_contents()->GetView()->StoreFocus(); |
1261 | 1261 |
1262 // Update various elements that are interested in knowing the current | 1262 // Update various elements that are interested in knowing the current |
1263 // TabContents. | 1263 // TabContents. |
1264 infobar_container_->ChangeTabContents(new_contents->infobar_tab_helper()); | 1264 infobar_container_->ChangeTabContents(new_contents->infobar_tab_helper()); |
1265 contents_container_->SetTab(new_contents); | 1265 contents_container_->SetTab(new_contents); |
1266 UpdateDevToolsForContents(new_contents->tab_contents()); | 1266 UpdateDevToolsForContents(new_contents->tab_contents()); |
1267 | 1267 |
1268 new_contents->tab_contents()->DidBecomeSelected(); | 1268 new_contents->tab_contents()->DidBecomeSelected(); |
1269 // TODO(estade): after we manage browser activation, add a check to make sure | 1269 // TODO(estade): after we manage browser activation, add a check to make sure |
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2450 wm_type == ui::WM_OPENBOX || | 2450 wm_type == ui::WM_OPENBOX || |
2451 wm_type == ui::WM_XFWM4); | 2451 wm_type == ui::WM_XFWM4); |
2452 } | 2452 } |
2453 | 2453 |
2454 // static | 2454 // static |
2455 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2455 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
2456 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2456 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
2457 browser_window_gtk->Init(); | 2457 browser_window_gtk->Init(); |
2458 return browser_window_gtk; | 2458 return browser_window_gtk; |
2459 } | 2459 } |
OLD | NEW |