Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: chrome/browser/ui/gtk/browser_window_gtk.cc

Issue 10031044: TabContents -> WebContentsImpl, part 5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (fixed) Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 TabContentsWrapper* devtools_contents = contents ? 1424 TabContentsWrapper* devtools_contents = contents ?
1425 DevToolsWindow::GetDevToolsContents(contents) : NULL; 1425 DevToolsWindow::GetDevToolsContents(contents) : NULL;
1426 if (old_devtools == devtools_contents) 1426 if (old_devtools == devtools_contents)
1427 return; 1427 return;
1428 1428
1429 if (old_devtools) 1429 if (old_devtools)
1430 devtools_container_->DetachTab(old_devtools); 1430 devtools_container_->DetachTab(old_devtools);
1431 1431
1432 devtools_container_->SetTab(devtools_contents); 1432 devtools_container_->SetTab(devtools_contents);
1433 if (devtools_contents) { 1433 if (devtools_contents) {
1434 // TabContentsViewGtk::WasShown is not called when tab contents is shown by 1434 // WebContentsViewGtk::WasShown is not called when tab contents is shown by
1435 // anything other than user selecting a Tab. 1435 // anything other than user selecting a Tab.
1436 // See TabContentsViewViews::OnWindowPosChanged for reference on how it 1436 // See TabContentsViewViews::OnWindowPosChanged for reference on how it
1437 // should be implemented. 1437 // should be implemented.
1438 devtools_contents->web_contents()->ShowContents(); 1438 devtools_contents->web_contents()->ShowContents();
1439 } 1439 }
1440 1440
1441 bool should_show = old_devtools == NULL && devtools_contents != NULL; 1441 bool should_show = old_devtools == NULL && devtools_contents != NULL;
1442 bool should_hide = old_devtools != NULL && devtools_contents == NULL; 1442 bool should_hide = old_devtools != NULL && devtools_contents == NULL;
1443 1443
1444 if (should_show) 1444 if (should_show)
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 wm_type == ui::WM_OPENBOX || 2596 wm_type == ui::WM_OPENBOX ||
2597 wm_type == ui::WM_XFWM4); 2597 wm_type == ui::WM_XFWM4);
2598 } 2598 }
2599 2599
2600 // static 2600 // static
2601 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2601 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2602 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2602 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2603 browser_window_gtk->Init(); 2603 browser_window_gtk->Init();
2604 return browser_window_gtk; 2604 return browser_window_gtk;
2605 } 2605 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698