| OLD | NEW | 
|---|
| 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 2308 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2319     FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2319     FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 
| 2320                       DidOpenRequestedURL(new_contents, | 2320                       DidOpenRequestedURL(new_contents, | 
| 2321                                           url, | 2321                                           url, | 
| 2322                                           referrer, | 2322                                           referrer, | 
| 2323                                           disposition, | 2323                                           disposition, | 
| 2324                                           transition_type, | 2324                                           transition_type, | 
| 2325                                           source_frame_id)); | 2325                                           source_frame_id)); | 
| 2326   } | 2326   } | 
| 2327 } | 2327 } | 
| 2328 | 2328 | 
|  | 2329 bool WebContentsImpl::ShouldIgnoreNavigation( | 
|  | 2330     const GURL& url, | 
|  | 2331     const content::Referrer& referrer, | 
|  | 2332     WindowOpenDisposition disposition, | 
|  | 2333     int64 source_frame_id, | 
|  | 2334     bool is_content_initiated) { | 
|  | 2335   if (!delegate_) | 
|  | 2336     return false; | 
|  | 2337   content::PageTransition transition_type = content::PAGE_TRANSITION_LINK; | 
|  | 2338   NavigationEntry* active_navigation_entry = controller_.GetActiveEntry(); | 
|  | 2339   if (active_navigation_entry) { | 
|  | 2340     transition_type = active_navigation_entry->GetTransitionType(); | 
|  | 2341   } | 
|  | 2342   return delegate_->ShouldIgnoreNavigation( | 
|  | 2343       this, url, referrer, disposition, is_content_initiated, transition_type); | 
|  | 2344 } | 
|  | 2345 | 
| 2329 void WebContentsImpl::RunJavaScriptMessage( | 2346 void WebContentsImpl::RunJavaScriptMessage( | 
| 2330     RenderViewHost* rvh, | 2347     RenderViewHost* rvh, | 
| 2331     const string16& message, | 2348     const string16& message, | 
| 2332     const string16& default_prompt, | 2349     const string16& default_prompt, | 
| 2333     const GURL& frame_url, | 2350     const GURL& frame_url, | 
| 2334     ui::JavascriptMessageType javascript_message_type, | 2351     ui::JavascriptMessageType javascript_message_type, | 
| 2335     IPC::Message* reply_msg, | 2352     IPC::Message* reply_msg, | 
| 2336     bool* did_suppress_message) { | 2353     bool* did_suppress_message) { | 
| 2337   // Suppress JavaScript dialogs when requested. Also suppress messages when | 2354   // Suppress JavaScript dialogs when requested. Also suppress messages when | 
| 2338   // showing an interstitial as it's shown over the previous page and we don't | 2355   // showing an interstitial as it's shown over the previous page and we don't | 
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2613 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2630 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 
| 2614   RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2631   RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 
| 2615   // Can be NULL during tests. | 2632   // Can be NULL during tests. | 
| 2616   if (rwh_view) | 2633   if (rwh_view) | 
| 2617     rwh_view->SetSize(GetView()->GetContainerSize()); | 2634     rwh_view->SetSize(GetView()->GetContainerSize()); | 
| 2618 } | 2635 } | 
| 2619 | 2636 | 
| 2620 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { | 2637 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { | 
| 2621   return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 2638   return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 
| 2622 } | 2639 } | 
| OLD | NEW | 
|---|