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

Side by Side Diff: chrome/browser/debugger/devtools_window.cc

Issue 9968078: Honor window size for chrome.windows.create when parent window is maximized. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extraneous logging 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 <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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698