| 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/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 DictionaryPrefUpdate update(prefs, wp_key.c_str()); | 368 DictionaryPrefUpdate update(prefs, wp_key.c_str()); |
| 369 DictionaryValue* defaults = update.Get(); | 369 DictionaryValue* defaults = update.Get(); |
| 370 defaults->SetInteger("left", 100); | 370 defaults->SetInteger("left", 100); |
| 371 defaults->SetInteger("top", 100); | 371 defaults->SetInteger("top", 100); |
| 372 defaults->SetInteger("right", 740); | 372 defaults->SetInteger("right", 740); |
| 373 defaults->SetInteger("bottom", 740); | 373 defaults->SetInteger("bottom", 740); |
| 374 defaults->SetBoolean("maximized", false); | 374 defaults->SetBoolean("maximized", false); |
| 375 defaults->SetBoolean("always_on_top", false); | 375 defaults->SetBoolean("always_on_top", false); |
| 376 } | 376 } |
| 377 | 377 |
| 378 browser_ = Browser::CreateForDevTools(profile_); | 378 browser_ = Browser::CreateWithParams( |
| 379 Browser::CreateParams::CreateForDevTools(profile_)); |
| 379 browser_->tabstrip_model()->AddTabContents( | 380 browser_->tabstrip_model()->AddTabContents( |
| 380 tab_contents_, -1, content::PAGE_TRANSITION_START_PAGE, | 381 tab_contents_, -1, content::PAGE_TRANSITION_START_PAGE, |
| 381 TabStripModel::ADD_ACTIVE); | 382 TabStripModel::ADD_ACTIVE); |
| 382 } | 383 } |
| 383 | 384 |
| 384 bool DevToolsWindow::FindInspectedBrowserAndTabIndex(Browser** browser, | 385 bool DevToolsWindow::FindInspectedBrowserAndTabIndex(Browser** browser, |
| 385 int* tab) { | 386 int* tab) { |
| 386 if (!inspected_tab_) | 387 if (!inspected_tab_) |
| 387 return false; | 388 return false; |
| 388 | 389 |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 content); | 745 content); |
| 745 } | 746 } |
| 746 | 747 |
| 747 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { | 748 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { |
| 748 if (inspected_tab_ && inspected_tab_->web_contents()->GetDelegate()) { | 749 if (inspected_tab_ && inspected_tab_->web_contents()->GetDelegate()) { |
| 749 return inspected_tab_->web_contents()->GetDelegate()-> | 750 return inspected_tab_->web_contents()->GetDelegate()-> |
| 750 GetJavaScriptDialogCreator(); | 751 GetJavaScriptDialogCreator(); |
| 751 } | 752 } |
| 752 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); | 753 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); |
| 753 } | 754 } |
| OLD | NEW |