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

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

Issue 10383207: Fix new -Wnull-conversion violations detected by a newer clang. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 DevToolsClientHost* client_host = manager->GetDevToolsClientHostFor(agent); 94 DevToolsClientHost* client_host = manager->GetDevToolsClientHostFor(agent);
95 DevToolsWindow* window = AsDevToolsWindow(client_host); 95 DevToolsWindow* window = AsDevToolsWindow(client_host);
96 if (!window || !window->is_docked()) 96 if (!window || !window->is_docked())
97 return NULL; 97 return NULL;
98 return window->tab_contents(); 98 return window->tab_contents();
99 } 99 }
100 100
101 // static 101 // static
102 bool DevToolsWindow::IsDevToolsWindow(RenderViewHost* window_rvh) { 102 bool DevToolsWindow::IsDevToolsWindow(RenderViewHost* window_rvh) {
103 if (g_instances == NULL) 103 if (g_instances == NULL)
104 return NULL; 104 return false;
105 DevToolsWindowList& instances = g_instances.Get(); 105 DevToolsWindowList& instances = g_instances.Get();
106 for (DevToolsWindowList::iterator it = instances.begin(); 106 for (DevToolsWindowList::iterator it = instances.begin();
107 it != instances.end(); ++it) { 107 it != instances.end(); ++it) {
108 if ((*it)->tab_contents_->web_contents()->GetRenderViewHost() == window_rvh) 108 if ((*it)->tab_contents_->web_contents()->GetRenderViewHost() == window_rvh)
109 return true; 109 return true;
110 } 110 }
111 return false; 111 return false;
112 } 112 }
113 113
114 // static 114 // static
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 CallClientFunction("InspectorFrontendAPI.appendedToURL", &url_value); 754 CallClientFunction("InspectorFrontendAPI.appendedToURL", &url_value);
755 } 755 }
756 756
757 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { 757 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() {
758 if (inspected_tab_ && inspected_tab_->web_contents()->GetDelegate()) { 758 if (inspected_tab_ && inspected_tab_->web_contents()->GetDelegate()) {
759 return inspected_tab_->web_contents()->GetDelegate()-> 759 return inspected_tab_->web_contents()->GetDelegate()->
760 GetJavaScriptDialogCreator(); 760 GetJavaScriptDialogCreator();
761 } 761 }
762 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); 762 return content::WebContentsDelegate::GetJavaScriptDialogCreator();
763 } 763 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698