Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 780343002: Remove always true guard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3711 matching lines...) Expand 10 before | Expand all | Expand 10 after
3722 // after Pepper API equips features related to surrounding text retrieval. 3722 // after Pepper API equips features related to surrounding text retrieval.
3723 gfx::Rect caret = focused_pepper_plugin_->GetCaretBounds(); 3723 gfx::Rect caret = focused_pepper_plugin_->GetCaretBounds();
3724 *start = caret; 3724 *start = caret;
3725 *end = caret; 3725 *end = caret;
3726 return; 3726 return;
3727 } 3727 }
3728 #endif 3728 #endif
3729 RenderWidget::GetSelectionBounds(start, end); 3729 RenderWidget::GetSelectionBounds(start, end);
3730 } 3730 }
3731 3731
3732 #if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID)
3733 void RenderViewImpl::GetCompositionCharacterBounds( 3732 void RenderViewImpl::GetCompositionCharacterBounds(
3734 std::vector<gfx::Rect>* bounds) { 3733 std::vector<gfx::Rect>* bounds) {
3735 DCHECK(bounds); 3734 DCHECK(bounds);
3736 bounds->clear(); 3735 bounds->clear();
3737 3736
3738 #if defined(ENABLE_PLUGINS) 3737 #if defined(ENABLE_PLUGINS)
3739 if (focused_pepper_plugin_) { 3738 if (focused_pepper_plugin_) {
3740 return; 3739 return;
3741 } 3740 }
3742 #endif 3741 #endif
(...skipping 24 matching lines...) Expand all
3767 } 3766 }
3768 3767
3769 void RenderViewImpl::GetCompositionRange(gfx::Range* range) { 3768 void RenderViewImpl::GetCompositionRange(gfx::Range* range) {
3770 #if defined(ENABLE_PLUGINS) 3769 #if defined(ENABLE_PLUGINS)
3771 if (focused_pepper_plugin_) { 3770 if (focused_pepper_plugin_) {
3772 return; 3771 return;
3773 } 3772 }
3774 #endif 3773 #endif
3775 RenderWidget::GetCompositionRange(range); 3774 RenderWidget::GetCompositionRange(range);
3776 } 3775 }
3777 #endif
3778 3776
3779 bool RenderViewImpl::CanComposeInline() { 3777 bool RenderViewImpl::CanComposeInline() {
3780 #if defined(ENABLE_PLUGINS) 3778 #if defined(ENABLE_PLUGINS)
3781 if (focused_pepper_plugin_) 3779 if (focused_pepper_plugin_)
3782 return focused_pepper_plugin_->IsPluginAcceptingCompositionEvents(); 3780 return focused_pepper_plugin_->IsPluginAcceptingCompositionEvents();
3783 #endif 3781 #endif
3784 return true; 3782 return true;
3785 } 3783 }
3786 3784
3787 void RenderViewImpl::InstrumentWillBeginFrame(int frame_id) { 3785 void RenderViewImpl::InstrumentWillBeginFrame(int frame_id) {
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
4199 std::vector<gfx::Size> sizes; 4197 std::vector<gfx::Size> sizes;
4200 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4198 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4201 if (!url.isEmpty()) 4199 if (!url.isEmpty())
4202 urls.push_back( 4200 urls.push_back(
4203 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4201 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4204 } 4202 }
4205 SendUpdateFaviconURL(urls); 4203 SendUpdateFaviconURL(urls);
4206 } 4204 }
4207 4205
4208 } // namespace content 4206 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698