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/message_loop.h" |
8 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
9 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
10 #include "chrome/common/chrome_constants.h" | 11 #include "chrome/common/chrome_constants.h" |
11 #include "chrome/common/render_messages.h" | 12 #include "chrome/common/render_messages.h" |
12 #include "chrome/renderer/autofill/autofill_agent.h" | 13 #include "chrome/renderer/autofill/autofill_agent.h" |
13 #include "content/renderer/render_view.h" | 14 #include "content/renderer/render_view.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 WebView* web_view = render_view()->webview(); | 433 WebView* web_view = render_view()->webview(); |
433 if (!web_view) { | 434 if (!web_view) { |
434 // When the WebView is going away, the render view should have called | 435 // When the WebView is going away, the render view should have called |
435 // CancelPendingTranslation() which should have stopped any pending work, so | 436 // CancelPendingTranslation() which should have stopped any pending work, so |
436 // that case should not happen. | 437 // that case should not happen. |
437 NOTREACHED(); | 438 NOTREACHED(); |
438 return NULL; | 439 return NULL; |
439 } | 440 } |
440 return web_view->mainFrame(); | 441 return web_view->mainFrame(); |
441 } | 442 } |
OLD | NEW |