OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_view_host.h" | 5 #include "chrome/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 | 943 |
944 // TODO(darin): Bug 1107929: Need to inform our delegate to show this view in | 944 // TODO(darin): Bug 1107929: Need to inform our delegate to show this view in |
945 // an app-modal fashion. | 945 // an app-modal fashion. |
946 } | 946 } |
947 | 947 |
948 void RenderViewHost::OnMsgRenderViewReady() { | 948 void RenderViewHost::OnMsgRenderViewReady() { |
949 WasResized(); | 949 WasResized(); |
950 delegate_->RenderViewReady(this); | 950 delegate_->RenderViewReady(this); |
951 } | 951 } |
952 | 952 |
953 void RenderViewHost::OnMsgRenderViewGone() { | 953 void RenderViewHost::OnMsgRenderViewGone(int status, int exit_code) { |
954 // Our base class RenderWidgetHost needs to reset some stuff. | 954 // Our base class RenderWidgetHost needs to reset some stuff. |
955 RendererExited(); | 955 RendererExited(static_cast<base::TerminationStatus>(status), exit_code); |
956 | 956 |
957 delegate_->RenderViewGone(this); | 957 delegate_->RenderViewGone(this, |
| 958 static_cast<base::TerminationStatus>(status), |
| 959 exit_code); |
958 } | 960 } |
959 | 961 |
960 // Called when the renderer navigates. For every frame loaded, we'll get this | 962 // Called when the renderer navigates. For every frame loaded, we'll get this |
961 // notification containing parameters identifying the navigation. | 963 // notification containing parameters identifying the navigation. |
962 // | 964 // |
963 // Subframes are identified by the page transition type. For subframes loaded | 965 // Subframes are identified by the page transition type. For subframes loaded |
964 // as part of a wider page load, the page_id will be the same as for the top | 966 // as part of a wider page load, the page_id will be the same as for the top |
965 // level frame. If the user explicitly requests a subframe navigation, we will | 967 // level frame. If the user explicitly requests a subframe navigation, we will |
966 // get a new page_id because we need to create a new navigation entry for that | 968 // get a new page_id because we need to create a new navigation entry for that |
967 // action. | 969 // action. |
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2053 } | 2055 } |
2054 | 2056 |
2055 void RenderViewHost::OnSetSuggestResult(int32 page_id, | 2057 void RenderViewHost::OnSetSuggestResult(int32 page_id, |
2056 const std::string& result) { | 2058 const std::string& result) { |
2057 RenderViewHostDelegate::BrowserIntegration* integration_delegate = | 2059 RenderViewHostDelegate::BrowserIntegration* integration_delegate = |
2058 delegate_->GetBrowserIntegrationDelegate(); | 2060 delegate_->GetBrowserIntegrationDelegate(); |
2059 if (!integration_delegate) | 2061 if (!integration_delegate) |
2060 return; | 2062 return; |
2061 integration_delegate->OnSetSuggestResult(page_id, result); | 2063 integration_delegate->OnSetSuggestResult(page_id, result); |
2062 } | 2064 } |
OLD | NEW |