Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2007-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2007-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 #include "config.h" | 5 #include "config.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 MSVC_PUSH_WARNING_LEVEL(0); | 9 MSVC_PUSH_WARNING_LEVEL(0); |
| 10 #include "CSSStyleSelector.h" | 10 #include "CSSStyleSelector.h" |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 #include "PageGroup.h" | 37 #include "PageGroup.h" |
| 38 #include "PlatformContextSkia.h" | 38 #include "PlatformContextSkia.h" |
| 39 #include "PlatformKeyboardEvent.h" | 39 #include "PlatformKeyboardEvent.h" |
| 40 #include "PlatformMouseEvent.h" | 40 #include "PlatformMouseEvent.h" |
| 41 #include "PlatformWheelEvent.h" | 41 #include "PlatformWheelEvent.h" |
| 42 #include "PluginInfoStore.h" | 42 #include "PluginInfoStore.h" |
| 43 #include "PopupMenuChromium.h" | 43 #include "PopupMenuChromium.h" |
| 44 #include "PopupMenuClient.h" | 44 #include "PopupMenuClient.h" |
| 45 #if defined(OS_WIN) | 45 #if defined(OS_WIN) |
| 46 #include "RenderThemeChromiumWin.h" | 46 #include "RenderThemeChromiumWin.h" |
| 47 #elif defined(OS_LINUX) | |
| 48 #include "RenderThemeChromiumLinux.h" | |
| 47 #else | 49 #else |
| 48 #include "RenderTheme.h" | 50 #include "RenderTheme.h" |
| 49 #endif | 51 #endif |
| 50 #include "RenderView.h" | 52 #include "RenderView.h" |
| 51 #include "ResourceHandle.h" | 53 #include "ResourceHandle.h" |
| 52 #include "SelectionController.h" | 54 #include "SelectionController.h" |
| 53 #include "Settings.h" | 55 #include "Settings.h" |
| 54 #include "TypingCommand.h" | 56 #include "TypingCommand.h" |
| 55 MSVC_POP_WARNING(); | 57 MSVC_POP_WARNING(); |
| 56 #undef LOG | 58 #undef LOG |
| (...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1771 if (page() && page()->focusController()) | 1773 if (page() && page()->focusController()) |
| 1772 page()->focusController()->setActive(active); | 1774 page()->focusController()->setActive(active); |
| 1773 } | 1775 } |
| 1774 | 1776 |
| 1775 bool WebViewImpl::IsActive() { | 1777 bool WebViewImpl::IsActive() { |
| 1776 return (page() && page()->focusController()) | 1778 return (page() && page()->focusController()) |
| 1777 ? page()->focusController()->isActive() | 1779 ? page()->focusController()->isActive() |
| 1778 : false; | 1780 : false; |
| 1779 } | 1781 } |
| 1780 | 1782 |
| 1783 #if defined(OS_LINUX) | |
| 1784 void WebViewImpl::SetThemeFocusRingColor(int r, int g, int b) { | |
|
darin (slow to review)
2009/09/10 06:14:47
why is this a method on WebView when it doesn't ha
| |
| 1785 reinterpret_cast<RenderThemeChromiumLinux*>(theme())-> | |
| 1786 setFocusRingColor(Color(r, g, b)); | |
| 1787 } | |
| 1788 #endif | |
| 1789 | |
| 1781 void WebViewImpl::DidCommitLoad(bool* is_new_navigation) { | 1790 void WebViewImpl::DidCommitLoad(bool* is_new_navigation) { |
| 1782 if (is_new_navigation) | 1791 if (is_new_navigation) |
| 1783 *is_new_navigation = observed_new_navigation_; | 1792 *is_new_navigation = observed_new_navigation_; |
| 1784 | 1793 |
| 1785 #ifndef NDEBUG | 1794 #ifndef NDEBUG |
| 1786 DCHECK(!observed_new_navigation_ || | 1795 DCHECK(!observed_new_navigation_ || |
| 1787 page_->mainFrame()->loader()->documentLoader() == new_navigation_loader_); | 1796 page_->mainFrame()->loader()->documentLoader() == new_navigation_loader_); |
| 1788 new_navigation_loader_ = NULL; | 1797 new_navigation_loader_ = NULL; |
| 1789 #endif | 1798 #endif |
| 1790 observed_new_navigation_ = false; | 1799 observed_new_navigation_ = false; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1892 | 1901 |
| 1893 return document->focusedNode(); | 1902 return document->focusedNode(); |
| 1894 } | 1903 } |
| 1895 | 1904 |
| 1896 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { | 1905 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { |
| 1897 IntPoint doc_point( | 1906 IntPoint doc_point( |
| 1898 page_->mainFrame()->view()->windowToContents(pos)); | 1907 page_->mainFrame()->view()->windowToContents(pos)); |
| 1899 return page_->mainFrame()->eventHandler()-> | 1908 return page_->mainFrame()->eventHandler()-> |
| 1900 hitTestResultAtPoint(doc_point, false); | 1909 hitTestResultAtPoint(doc_point, false); |
| 1901 } | 1910 } |
| OLD | NEW |