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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 DictionaryValue* defaults = update.Get(); | 402 DictionaryValue* defaults = update.Get(); |
403 defaults->SetInteger("left", 100); | 403 defaults->SetInteger("left", 100); |
404 defaults->SetInteger("top", 100); | 404 defaults->SetInteger("top", 100); |
405 defaults->SetInteger("right", 740); | 405 defaults->SetInteger("right", 740); |
406 defaults->SetInteger("bottom", 740); | 406 defaults->SetInteger("bottom", 740); |
407 defaults->SetBoolean("maximized", false); | 407 defaults->SetBoolean("maximized", false); |
408 defaults->SetBoolean("always_on_top", false); | 408 defaults->SetBoolean("always_on_top", false); |
409 } | 409 } |
410 | 410 |
411 chrome::HostDesktopType host_desktop_type = | 411 chrome::HostDesktopType host_desktop_type = |
412 chrome::GetHostDesktopTypeForNativeView(web_contents_->GetNativeView()); | 412 chrome::GetHostDesktopTypeForNativeView( |
| 413 web_contents_->GetView()->GetNativeView()); |
413 | 414 |
414 browser_ = new Browser(Browser::CreateParams::CreateForDevTools( | 415 browser_ = new Browser(Browser::CreateParams::CreateForDevTools( |
415 profile_, host_desktop_type)); | 416 profile_, host_desktop_type)); |
416 browser_->tab_strip_model()->AddWebContents( | 417 browser_->tab_strip_model()->AddWebContents( |
417 web_contents_, -1, content::PAGE_TRANSITION_AUTO_TOPLEVEL, | 418 web_contents_, -1, content::PAGE_TRANSITION_AUTO_TOPLEVEL, |
418 TabStripModel::ADD_ACTIVE); | 419 TabStripModel::ADD_ACTIVE); |
419 } | 420 } |
420 | 421 |
421 bool DevToolsWindow::FindInspectedBrowserAndTabIndex(Browser** browser, | 422 bool DevToolsWindow::FindInspectedBrowserAndTabIndex(Browser** browser, |
422 int* tab) { | 423 int* tab) { |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 | 989 |
989 // static | 990 // static |
990 DevToolsDockSide DevToolsWindow::SideFromString( | 991 DevToolsDockSide DevToolsWindow::SideFromString( |
991 const std::string& dock_side) { | 992 const std::string& dock_side) { |
992 if (dock_side == kDockSideRight) | 993 if (dock_side == kDockSideRight) |
993 return DEVTOOLS_DOCK_SIDE_RIGHT; | 994 return DEVTOOLS_DOCK_SIDE_RIGHT; |
994 if (dock_side == kDockSideBottom) | 995 if (dock_side == kDockSideBottom) |
995 return DEVTOOLS_DOCK_SIDE_BOTTOM; | 996 return DEVTOOLS_DOCK_SIDE_BOTTOM; |
996 return DEVTOOLS_DOCK_SIDE_UNDOCKED; | 997 return DEVTOOLS_DOCK_SIDE_UNDOCKED; |
997 } | 998 } |
OLD | NEW |