| Index: chrome/browser/ui/cocoa/dev_tools_controller.mm
|
| ===================================================================
|
| --- chrome/browser/ui/cocoa/dev_tools_controller.mm (revision 72174)
|
| +++ chrome/browser/ui/cocoa/dev_tools_controller.mm (working copy)
|
| @@ -11,7 +11,6 @@
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/debugger/devtools_window.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| -#include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/tab_contents/tab_contents.h"
|
| #import "chrome/browser/ui/cocoa/view_id_util.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -29,8 +28,7 @@
|
|
|
|
|
| @interface DevToolsController (Private)
|
| -- (void)showDevToolsContents:(TabContents*)devToolsContents
|
| - withProfile:(Profile*)profile;
|
| +- (void)showDevToolsContents:(TabContents*)devToolsContents;
|
| - (void)resizeDevToolsToNewHeight:(CGFloat)height;
|
| @end
|
|
|
| @@ -65,21 +63,19 @@
|
| return splitView_.get();
|
| }
|
|
|
| -- (void)updateDevToolsForTabContents:(TabContents*)contents
|
| - withProfile:(Profile*)profile {
|
| +- (void)updateDevToolsForTabContents:(TabContents*)contents {
|
| // Get current devtools content.
|
| TabContents* devToolsContents = contents ?
|
| DevToolsWindow::GetDevToolsContents(contents) : NULL;
|
|
|
| - [self showDevToolsContents:devToolsContents withProfile:profile];
|
| + [self showDevToolsContents:devToolsContents];
|
| }
|
|
|
| - (void)ensureContentsVisible {
|
| [contentsController_ ensureContentsVisible];
|
| }
|
|
|
| -- (void)showDevToolsContents:(TabContents*)devToolsContents
|
| - withProfile:(Profile*)profile {
|
| +- (void)showDevToolsContents:(TabContents*)devToolsContents {
|
| [contentsController_ ensureContentsSizeDoesNotChange];
|
|
|
| NSArray* subviews = [splitView_ subviews];
|
| @@ -95,8 +91,8 @@
|
| CGFloat splitOffset = 0;
|
| if ([subviews count] == 1) {
|
| // Load the default split offset.
|
| - splitOffset = profile->GetPrefs()->
|
| - GetInteger(prefs::kDevToolsSplitLocation);
|
| + splitOffset = g_browser_process->local_state()->GetInteger(
|
| + prefs::kDevToolsSplitLocation);
|
| if (splitOffset < 0) {
|
| // Initial load, set to default value.
|
| splitOffset = kDefaultContentsSplitOffset;
|
| @@ -121,8 +117,7 @@
|
| NSView* oldDevToolsContentsView = [subviews objectAtIndex:1];
|
| // Store split offset when hiding devtools window only.
|
| int splitOffset = NSHeight([oldDevToolsContentsView frame]);
|
| -
|
| - profile->GetPrefs()->SetInteger(
|
| + g_browser_process->local_state()->SetInteger(
|
| prefs::kDevToolsSplitLocation, splitOffset);
|
| [oldDevToolsContentsView removeFromSuperview];
|
| [splitView_ adjustSubviews];
|
|
|
| Property changes on: chrome/browser/ui/cocoa/dev_tools_controller.mm
|
| ___________________________________________________________________
|
| Added: svn:mergeinfo
|
|
|
|
|