| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ |
| 6 #define CHROME_RENDERER_RENDER_VIEW_H_ | 6 #define CHROME_RENDERER_RENDER_VIEW_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 429 |
| 430 // Sends a message and runs a nested message loop. | 430 // Sends a message and runs a nested message loop. |
| 431 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); | 431 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); |
| 432 | 432 |
| 433 // Called when the "idle" user script state has been reached. See | 433 // Called when the "idle" user script state has been reached. See |
| 434 // UserScript::DOCUMENT_IDLE. | 434 // UserScript::DOCUMENT_IDLE. |
| 435 void OnUserScriptIdleTriggered(WebKit::WebFrame* frame); | 435 void OnUserScriptIdleTriggered(WebKit::WebFrame* frame); |
| 436 | 436 |
| 437 PageTranslator* page_translator() const { return page_translator_.get(); } | 437 PageTranslator* page_translator() const { return page_translator_.get(); } |
| 438 | 438 |
| 439 // Returns the ISO 639_1 language code of the current page | 439 // Returns the ISO 639 language code of the current page (e.g. en, fr, zh). |
| 440 // (ex: en, fr, zh...). Returns 'unknown' if the language could not be | 440 // If ISO 639-1 code is not available for the language, ISO 639-2 3-letter cod
e |
| 441 // determined. | 441 // will be returned (e.g. kha for Khasi and und for undtermined). For traditio
nal |
| 442 // Chinse, 'zh-TW' will be returned while for simplified Chinse, 'zh' will be |
| 443 // returned. |
| 444 // TODO(jungshik): Make it return 'he' (the correct ISO 639 code for Hebrew) |
| 445 // instead of the obsolete 'iw'. Perhaps, it's also better to return 'zh-Hans' |
| 446 // (or 'zh-CN') for Simplified Chinese instead of 'zh' to be aligned with |
| 447 // 'zh-TW' for Traditional Chinse. |
| 442 std::string DetectLanguage(); | 448 std::string DetectLanguage(); |
| 443 | 449 |
| 444 protected: | 450 protected: |
| 445 // RenderWidget overrides: | 451 // RenderWidget overrides: |
| 446 virtual void Close(); | 452 virtual void Close(); |
| 447 virtual void OnResize(const gfx::Size& new_size, | 453 virtual void OnResize(const gfx::Size& new_size, |
| 448 const gfx::Rect& resizer_rect); | 454 const gfx::Rect& resizer_rect); |
| 449 virtual void DidPaint(); | 455 virtual void DidPaint(); |
| 450 virtual void DidHandleKeyEvent(); | 456 virtual void DidHandleKeyEvent(); |
| 451 | 457 |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 int64 session_storage_namespace_id_; | 1019 int64 session_storage_namespace_id_; |
| 1014 | 1020 |
| 1015 // Page translation related objects. | 1021 // Page translation related objects. |
| 1016 TextTranslatorImpl text_translator_; | 1022 TextTranslatorImpl text_translator_; |
| 1017 scoped_ptr<PageTranslator> page_translator_; | 1023 scoped_ptr<PageTranslator> page_translator_; |
| 1018 | 1024 |
| 1019 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1025 DISALLOW_COPY_AND_ASSIGN(RenderView); |
| 1020 }; | 1026 }; |
| 1021 | 1027 |
| 1022 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 1028 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |