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

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

Issue 10868116: Pass result of blockage across content API when new tab blocked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 "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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 void Shell::LoadingStateChanged(WebContents* source) { 189 void Shell::LoadingStateChanged(WebContents* source) {
190 UpdateNavigationControls(); 190 UpdateNavigationControls();
191 PlatformSetIsLoading(source->IsLoading()); 191 PlatformSetIsLoading(source->IsLoading());
192 } 192 }
193 193
194 void Shell::CloseContents(WebContents* source) { 194 void Shell::CloseContents(WebContents* source) {
195 Close(); 195 Close();
196 } 196 }
197 197
198 void Shell::WebContentsCreated(WebContents* source_contents, 198 bool Shell::WebContentsCreated(WebContents* source_contents,
199 int64 source_frame_id, 199 int64 source_frame_id,
200 const GURL& target_url, 200 const GURL& target_url,
201 WebContents* new_contents) { 201 WebContents* new_contents) {
202 CreateShell(new_contents); 202 CreateShell(new_contents);
203 return true;
203 } 204 }
204 205
205 void Shell::DidNavigateMainFramePostCommit(WebContents* web_contents) { 206 void Shell::DidNavigateMainFramePostCommit(WebContents* web_contents) {
206 PlatformSetAddressBarURL(web_contents->GetURL()); 207 PlatformSetAddressBarURL(web_contents->GetURL());
207 } 208 }
208 209
209 JavaScriptDialogCreator* Shell::GetJavaScriptDialogCreator() { 210 JavaScriptDialogCreator* Shell::GetJavaScriptDialogCreator() {
210 if (!dialog_creator_.get()) 211 if (!dialog_creator_.get())
211 dialog_creator_.reset(new ShellJavaScriptDialogCreator()); 212 dialog_creator_.reset(new ShellJavaScriptDialogCreator());
212 return dialog_creator_.get(); 213 return dialog_creator_.get();
(...skipping 23 matching lines...) Expand all
236 Details<std::pair<NavigationEntry*, bool> >(details).ptr(); 237 Details<std::pair<NavigationEntry*, bool> >(details).ptr();
237 238
238 if (title->first) { 239 if (title->first) {
239 string16 text = title->first->GetTitle(); 240 string16 text = title->first->GetTitle();
240 PlatformSetTitle(text); 241 PlatformSetTitle(text);
241 } 242 }
242 } 243 }
243 } 244 }
244 245
245 } // namespace content 246 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698