| 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 "base/utf_string_conversions.h" |
| 9 #include "chrome/common/chrome_constants.h" | 9 #include "chrome/common/chrome_constants.h" |
| 10 #include "chrome/common/render_messages.h" |
| 10 #include "chrome/renderer/render_view.h" | 11 #include "chrome/renderer/render_view.h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 15 #include "v8/include/v8.h" | 16 #include "v8/include/v8.h" |
| 16 #include "webkit/glue/dom_operations.h" | 17 #include "webkit/glue/dom_operations.h" |
| 17 | 18 |
| 18 using WebKit::WebDocument; | 19 using WebKit::WebDocument; |
| 19 using WebKit::WebElement; | 20 using WebKit::WebElement; |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 WebView* web_view = render_view()->webview(); | 385 WebView* web_view = render_view()->webview(); |
| 385 if (!web_view) { | 386 if (!web_view) { |
| 386 // When the WebView is going away, the render view should have called | 387 // When the WebView is going away, the render view should have called |
| 387 // CancelPendingTranslation() which should have stopped any pending work, so | 388 // CancelPendingTranslation() which should have stopped any pending work, so |
| 388 // that case should not happen. | 389 // that case should not happen. |
| 389 NOTREACHED(); | 390 NOTREACHED(); |
| 390 return NULL; | 391 return NULL; |
| 391 } | 392 } |
| 392 return web_view->mainFrame(); | 393 return web_view->mainFrame(); |
| 393 } | 394 } |
| OLD | NEW |