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/renderer/translate_helper.h" | 5 #include "chrome/renderer/translate_helper.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/utf_string_conversions.h" |
8 #include "chrome/common/chrome_constants.h" | 9 #include "chrome/common/chrome_constants.h" |
9 #include "chrome/renderer/render_view.h" | 10 #include "chrome/renderer/render_view.h" |
10 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 11 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
11 #include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" | 12 #include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" |
12 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" |
13 #include "v8/include/v8.h" | 14 #include "v8/include/v8.h" |
14 | 15 |
15 using WebKit::WebFrame; | 16 using WebKit::WebFrame; |
16 using WebKit::WebScriptSource; | 17 using WebKit::WebScriptSource; |
17 | 18 |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 WebKit::WebView* web_view = render_view_->webview(); | 304 WebKit::WebView* web_view = render_view_->webview(); |
304 if (!web_view) { | 305 if (!web_view) { |
305 // When the WebView is going away, the render view should have called | 306 // When the WebView is going away, the render view should have called |
306 // CancelPendingTranslation() which should have stopped any pending work, so | 307 // CancelPendingTranslation() which should have stopped any pending work, so |
307 // that case should not happen. | 308 // that case should not happen. |
308 NOTREACHED(); | 309 NOTREACHED(); |
309 return NULL; | 310 return NULL; |
310 } | 311 } |
311 return web_view->mainFrame(); | 312 return web_view->mainFrame(); |
312 } | 313 } |
OLD | NEW |