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 <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 | 1432 |
1433 if (old_devtools) | 1433 if (old_devtools) |
1434 devtools_container_->DetachTab(old_devtools); | 1434 devtools_container_->DetachTab(old_devtools); |
1435 | 1435 |
1436 devtools_container_->SetTab(devtools_contents); | 1436 devtools_container_->SetTab(devtools_contents); |
1437 if (devtools_contents) { | 1437 if (devtools_contents) { |
1438 // WebContentsViewGtk::WasShown is not called when tab contents is shown by | 1438 // WebContentsViewGtk::WasShown is not called when tab contents is shown by |
1439 // anything other than user selecting a Tab. | 1439 // anything other than user selecting a Tab. |
1440 // See TabContentsViewViews::OnWindowPosChanged for reference on how it | 1440 // See TabContentsViewViews::OnWindowPosChanged for reference on how it |
1441 // should be implemented. | 1441 // should be implemented. |
1442 devtools_contents->web_contents()->WasRestored(); | 1442 devtools_contents->web_contents()->WasShown(); |
1443 } | 1443 } |
1444 | 1444 |
1445 bool should_show = old_devtools == NULL && devtools_contents != NULL; | 1445 bool should_show = old_devtools == NULL && devtools_contents != NULL; |
1446 bool should_hide = old_devtools != NULL && devtools_contents == NULL; | 1446 bool should_hide = old_devtools != NULL && devtools_contents == NULL; |
1447 | 1447 |
1448 if (should_show) | 1448 if (should_show) |
1449 ShowDevToolsContainer(); | 1449 ShowDevToolsContainer(); |
1450 else if (should_hide) | 1450 else if (should_hide) |
1451 HideDevToolsContainer(); | 1451 HideDevToolsContainer(); |
1452 } | 1452 } |
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2593 wm_type == ui::WM_OPENBOX || | 2593 wm_type == ui::WM_OPENBOX || |
2594 wm_type == ui::WM_XFWM4); | 2594 wm_type == ui::WM_XFWM4); |
2595 } | 2595 } |
2596 | 2596 |
2597 // static | 2597 // static |
2598 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2598 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
2599 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2599 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
2600 browser_window_gtk->Init(); | 2600 browser_window_gtk->Init(); |
2601 return browser_window_gtk; | 2601 return browser_window_gtk; |
2602 } | 2602 } |
OLD | NEW |