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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 15706007: [Mac] Fix crash when closing window if the devtools process was killed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 // We need to deactivate the controls (in the "WebView"). To do this, get the 658 // We need to deactivate the controls (in the "WebView"). To do this, get the
659 // selected WebContents's RenderWidgetHostView and tell it to deactivate. 659 // selected WebContents's RenderWidgetHostView and tell it to deactivate.
660 if (WebContents* contents = 660 if (WebContents* contents =
661 browser_->tab_strip_model()->GetActiveWebContents()) { 661 browser_->tab_strip_model()->GetActiveWebContents()) {
662 662
663 DevToolsWindow* devtoolsWindow = 663 DevToolsWindow* devtoolsWindow =
664 DevToolsWindow::GetDockedInstanceForInspectedTab(contents); 664 DevToolsWindow::GetDockedInstanceForInspectedTab(contents);
665 if (devtoolsWindow) { 665 if (devtoolsWindow) {
666 RenderWidgetHostView* devtoolsView = 666 RenderWidgetHostView* devtoolsView =
667 devtoolsWindow->web_contents()->GetRenderWidgetHostView(); 667 devtoolsWindow->web_contents()->GetRenderWidgetHostView();
668 if (devtoolsView->HasFocus()) { 668 if (devtoolsView && devtoolsView->HasFocus()) {
669 devtoolsView->SetActive(false); 669 devtoolsView->SetActive(false);
670 return; 670 return;
671 } 671 }
672 } 672 }
673 673
674 if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView()) 674 if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView())
675 rwhv->SetActive(false); 675 rwhv->SetActive(false);
676 } 676 }
677 } 677 }
678 678
(...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 2228
2229 - (BOOL)supportsBookmarkBar { 2229 - (BOOL)supportsBookmarkBar {
2230 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2230 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2231 } 2231 }
2232 2232
2233 - (BOOL)isTabbedWindow { 2233 - (BOOL)isTabbedWindow {
2234 return browser_->is_type_tabbed(); 2234 return browser_->is_type_tabbed();
2235 } 2235 }
2236 2236
2237 @end // @implementation BrowserWindowController(WindowType) 2237 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698