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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 DictionaryPrefUpdate update(prefs, wp_key.c_str()); | 372 DictionaryPrefUpdate update(prefs, wp_key.c_str()); |
373 DictionaryValue* defaults = update.Get(); | 373 DictionaryValue* defaults = update.Get(); |
374 defaults->SetInteger("left", 100); | 374 defaults->SetInteger("left", 100); |
375 defaults->SetInteger("top", 100); | 375 defaults->SetInteger("top", 100); |
376 defaults->SetInteger("right", 740); | 376 defaults->SetInteger("right", 740); |
377 defaults->SetInteger("bottom", 740); | 377 defaults->SetInteger("bottom", 740); |
378 defaults->SetBoolean("maximized", false); | 378 defaults->SetBoolean("maximized", false); |
379 defaults->SetBoolean("always_on_top", false); | 379 defaults->SetBoolean("always_on_top", false); |
380 } | 380 } |
381 | 381 |
382 browser_ = Browser::CreateWithParams( | 382 browser_ = new Browser(Browser::CreateParams::CreateForDevTools(profile_)); |
383 Browser::CreateParams::CreateForDevTools(profile_)); | |
384 browser_->tab_strip_model()->AddTabContents( | 383 browser_->tab_strip_model()->AddTabContents( |
385 tab_contents_, -1, content::PAGE_TRANSITION_START_PAGE, | 384 tab_contents_, -1, content::PAGE_TRANSITION_START_PAGE, |
386 TabStripModel::ADD_ACTIVE); | 385 TabStripModel::ADD_ACTIVE); |
387 } | 386 } |
388 | 387 |
389 bool DevToolsWindow::FindInspectedBrowserAndTabIndex(Browser** browser, | 388 bool DevToolsWindow::FindInspectedBrowserAndTabIndex(Browser** browser, |
390 int* tab) { | 389 int* tab) { |
391 if (!inspected_tab_) | 390 if (!inspected_tab_) |
392 return false; | 391 return false; |
393 | 392 |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 GetJavaScriptDialogCreator(); | 751 GetJavaScriptDialogCreator(); |
753 } | 752 } |
754 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); | 753 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); |
755 } | 754 } |
756 | 755 |
757 void DevToolsWindow::RunFileChooser(WebContents* web_contents, | 756 void DevToolsWindow::RunFileChooser(WebContents* web_contents, |
758 const FileChooserParams& params) { | 757 const FileChooserParams& params) { |
759 FileSelectHelper::RunFileChooser(web_contents, params); | 758 FileSelectHelper::RunFileChooser(web_contents, params); |
760 } | 759 } |
761 | 760 |
OLD | NEW |