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

Side by Side Diff: content/shell/shell.cc

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 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
« no previous file with comments | « content/renderer/webplugin_delegate_proxy.cc ('k') | content/shell/shell_browser_context.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 "content/shell/shell.h" 5 #include "content/shell/shell.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 return; 201 return;
202 registrar_.Remove(this, 202 registrar_.Remove(this,
203 NOTIFICATION_WEB_CONTENTS_DESTROYED, 203 NOTIFICATION_WEB_CONTENTS_DESTROYED,
204 Source<WebContents>( 204 Source<WebContents>(
205 devtools_frontend_->frontend_shell()->web_contents())); 205 devtools_frontend_->frontend_shell()->web_contents()));
206 devtools_frontend_->Close(); 206 devtools_frontend_->Close();
207 devtools_frontend_ = NULL; 207 devtools_frontend_ = NULL;
208 } 208 }
209 209
210 gfx::NativeView Shell::GetContentView() { 210 gfx::NativeView Shell::GetContentView() {
211 if (!web_contents_.get()) 211 if (!web_contents_)
212 return NULL; 212 return NULL;
213 return web_contents_->GetView()->GetNativeView(); 213 return web_contents_->GetView()->GetNativeView();
214 } 214 }
215 215
216 WebContents* Shell::OpenURLFromTab(WebContents* source, 216 WebContents* Shell::OpenURLFromTab(WebContents* source,
217 const OpenURLParams& params) { 217 const OpenURLParams& params) {
218 // The only one we implement for now. 218 // The only one we implement for now.
219 DCHECK(params.disposition == CURRENT_TAB); 219 DCHECK(params.disposition == CURRENT_TAB);
220 source->GetController().LoadURL( 220 source->GetController().LoadURL(
221 params.url, params.referrer, params.transition, std::string()); 221 params.url, params.referrer, params.transition, std::string());
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 CreateShell(new_contents); 274 CreateShell(new_contents);
275 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 275 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
276 NotifyDoneForwarder::CreateForWebContents(new_contents); 276 NotifyDoneForwarder::CreateForWebContents(new_contents);
277 } 277 }
278 278
279 void Shell::DidNavigateMainFramePostCommit(WebContents* web_contents) { 279 void Shell::DidNavigateMainFramePostCommit(WebContents* web_contents) {
280 PlatformSetAddressBarURL(web_contents->GetURL()); 280 PlatformSetAddressBarURL(web_contents->GetURL());
281 } 281 }
282 282
283 JavaScriptDialogManager* Shell::GetJavaScriptDialogManager() { 283 JavaScriptDialogManager* Shell::GetJavaScriptDialogManager() {
284 if (!dialog_manager_.get()) 284 if (!dialog_manager_)
285 dialog_manager_.reset(new ShellJavaScriptDialogManager()); 285 dialog_manager_.reset(new ShellJavaScriptDialogManager());
286 return dialog_manager_.get(); 286 return dialog_manager_.get();
287 } 287 }
288 288
289 bool Shell::AddMessageToConsole(WebContents* source, 289 bool Shell::AddMessageToConsole(WebContents* source,
290 int32 level, 290 int32 level,
291 const string16& message, 291 const string16& message,
292 int32 line_no, 292 int32 line_no,
293 const string16& source_id) { 293 const string16& source_id) {
294 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree); 294 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree);
(...skipping 26 matching lines...) Expand all
321 } 321 }
322 } else if (type == NOTIFICATION_WEB_CONTENTS_DESTROYED) { 322 } else if (type == NOTIFICATION_WEB_CONTENTS_DESTROYED) {
323 devtools_frontend_ = NULL; 323 devtools_frontend_ = NULL;
324 registrar_.Remove(this, NOTIFICATION_WEB_CONTENTS_DESTROYED, source); 324 registrar_.Remove(this, NOTIFICATION_WEB_CONTENTS_DESTROYED, source);
325 } else { 325 } else {
326 NOTREACHED(); 326 NOTREACHED();
327 } 327 }
328 } 328 }
329 329
330 } // namespace content 330 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/webplugin_delegate_proxy.cc ('k') | content/shell/shell_browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698