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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 9978015: Make browser_handles_top_level_requests synchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: incorporate feedback Created 8 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
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/browser/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after
2305 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2305 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2306 DidOpenRequestedURL(new_contents, 2306 DidOpenRequestedURL(new_contents,
2307 url, 2307 url,
2308 referrer, 2308 referrer,
2309 disposition, 2309 disposition,
2310 transition_type, 2310 transition_type,
2311 source_frame_id)); 2311 source_frame_id));
2312 } 2312 }
2313 } 2313 }
2314 2314
2315 bool TabContents::ShouldIgnoreNavigation(
2316 const GURL& url,
2317 const content::Referrer& referrer,
2318 WindowOpenDisposition disposition,
2319 int64 source_frame_id,
2320 bool is_content_initiated) {
2321 if (!delegate_)
2322 return false;
2323 content::PageTransition transition_type = content::PAGE_TRANSITION_LINK;
2324 NavigationEntry* active_navigation_entry = controller_.GetActiveEntry();
2325 if (active_navigation_entry) {
2326 transition_type = active_navigation_entry->GetTransitionType();
2327 }
2328 return delegate_->ShouldIgnoreNavigation(
2329 this, url, referrer, disposition, is_content_initiated, transition_type);
2330 }
2331
2315 void TabContents::RunJavaScriptMessage( 2332 void TabContents::RunJavaScriptMessage(
2316 RenderViewHost* rvh, 2333 RenderViewHost* rvh,
2317 const string16& message, 2334 const string16& message,
2318 const string16& default_prompt, 2335 const string16& default_prompt,
2319 const GURL& frame_url, 2336 const GURL& frame_url,
2320 ui::JavascriptMessageType javascript_message_type, 2337 ui::JavascriptMessageType javascript_message_type,
2321 IPC::Message* reply_msg, 2338 IPC::Message* reply_msg,
2322 bool* did_suppress_message) { 2339 bool* did_suppress_message) {
2323 // Suppress JavaScript dialogs when requested. Also suppress messages when 2340 // Suppress JavaScript dialogs when requested. Also suppress messages when
2324 // showing an interstitial as it's shown over the previous page and we don't 2341 // showing an interstitial as it's shown over the previous page and we don't
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2613 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2597 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); 2614 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh);
2598 // Can be NULL during tests. 2615 // Can be NULL during tests.
2599 if (rwh_view) 2616 if (rwh_view)
2600 rwh_view->SetSize(GetView()->GetContainerSize()); 2617 rwh_view->SetSize(GetView()->GetContainerSize());
2601 } 2618 }
2602 2619
2603 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { 2620 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() {
2604 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); 2621 return static_cast<RenderViewHostImpl*>(GetRenderViewHost());
2605 } 2622 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698