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

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: fix comment 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
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3722 matching lines...) Expand 10 before | Expand all | Expand 10 after
3733 // after Pepper API equips features related to surrounding text retrieval. 3733 // after Pepper API equips features related to surrounding text retrieval.
3734 gfx::Rect caret = focused_pepper_plugin_->GetCaretBounds(); 3734 gfx::Rect caret = focused_pepper_plugin_->GetCaretBounds();
3735 *start = caret; 3735 *start = caret;
3736 *end = caret; 3736 *end = caret;
3737 return; 3737 return;
3738 } 3738 }
3739 #endif 3739 #endif
3740 RenderWidget::GetSelectionBounds(start, end); 3740 RenderWidget::GetSelectionBounds(start, end);
3741 } 3741 }
3742 3742
3743 #if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID)
3744 void RenderViewImpl::GetCompositionCharacterBounds( 3743 void RenderViewImpl::GetCompositionCharacterBounds(
3745 std::vector<gfx::Rect>* bounds) { 3744 std::vector<gfx::Rect>* bounds) {
3746 DCHECK(bounds); 3745 DCHECK(bounds);
3747 bounds->clear(); 3746 bounds->clear();
3748 3747
3749 #if defined(ENABLE_PLUGINS) 3748 #if defined(ENABLE_PLUGINS)
3750 if (focused_pepper_plugin_) { 3749 if (focused_pepper_plugin_) {
3751 return; 3750 return;
3752 } 3751 }
3753 #endif 3752 #endif
(...skipping 24 matching lines...) Expand all
3778 } 3777 }
3779 3778
3780 void RenderViewImpl::GetCompositionRange(gfx::Range* range) { 3779 void RenderViewImpl::GetCompositionRange(gfx::Range* range) {
3781 #if defined(ENABLE_PLUGINS) 3780 #if defined(ENABLE_PLUGINS)
3782 if (focused_pepper_plugin_) { 3781 if (focused_pepper_plugin_) {
3783 return; 3782 return;
3784 } 3783 }
3785 #endif 3784 #endif
3786 RenderWidget::GetCompositionRange(range); 3785 RenderWidget::GetCompositionRange(range);
3787 } 3786 }
3788 #endif
3789 3787
3790 bool RenderViewImpl::CanComposeInline() { 3788 bool RenderViewImpl::CanComposeInline() {
3791 #if defined(ENABLE_PLUGINS) 3789 #if defined(ENABLE_PLUGINS)
3792 if (focused_pepper_plugin_) 3790 if (focused_pepper_plugin_)
3793 return focused_pepper_plugin_->IsPluginAcceptingCompositionEvents(); 3791 return focused_pepper_plugin_->IsPluginAcceptingCompositionEvents();
3794 #endif 3792 #endif
3795 return true; 3793 return true;
3796 } 3794 }
3797 3795
3798 void RenderViewImpl::InstrumentWillBeginFrame(int frame_id) { 3796 void RenderViewImpl::InstrumentWillBeginFrame(int frame_id) {
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
4210 std::vector<gfx::Size> sizes; 4208 std::vector<gfx::Size> sizes;
4211 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4209 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4212 if (!url.isEmpty()) 4210 if (!url.isEmpty())
4213 urls.push_back( 4211 urls.push_back(
4214 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4212 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4215 } 4213 }
4216 SendUpdateFaviconURL(urls); 4214 SendUpdateFaviconURL(urls);
4217 } 4215 }
4218 4216
4219 } // namespace content 4217 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698