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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 173642: Set the focus ring color to match the Gtk theme focus color. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: connect to notification Created 11 years, 3 months 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 | Annotate | Revision Log
OLDNEW
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 #include "chrome/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 if (counter) { 293 if (counter) {
294 shared_popup_counter_ = counter; 294 shared_popup_counter_ = counter;
295 shared_popup_counter_->data++; 295 shared_popup_counter_->data++;
296 decrement_shared_popup_at_destruction_ = true; 296 decrement_shared_popup_at_destruction_ = true;
297 } else { 297 } else {
298 shared_popup_counter_ = new SharedRenderViewCounter(0); 298 shared_popup_counter_ = new SharedRenderViewCounter(0);
299 decrement_shared_popup_at_destruction_ = false; 299 decrement_shared_popup_at_destruction_ = false;
300 } 300 }
301 301
302 OnSetRendererPrefs(renderer_prefs);
303
304 devtools_agent_.reset(new DevToolsAgent(routing_id, this)); 302 devtools_agent_.reset(new DevToolsAgent(routing_id, this));
305 303
306 webwidget_ = WebView::Create(); 304 webwidget_ = WebView::Create();
307 webkit_preferences_.Apply(webview()); 305 webkit_preferences_.Apply(webview());
308 webview()->InitializeMainFrame(this); 306 webview()->InitializeMainFrame(this);
309 307
308 OnSetRendererPrefs(renderer_prefs);
309
310 #if defined(OS_LINUX) 310 #if defined(OS_LINUX)
311 // We have to enable ourselves as the editor delegate on linux so we can copy 311 // We have to enable ourselves as the editor delegate on linux so we can copy
312 // text selections to the X clipboard. 312 // text selections to the X clipboard.
313 webview()->SetUseEditorDelegate(true); 313 webview()->SetUseEditorDelegate(true);
314 #endif 314 #endif
315 315
316 // Don't let WebCore keep a B/F list - we have our own. 316 // Don't let WebCore keep a B/F list - we have our own.
317 // We let it keep 1 entry because FrameLoader::goToItem expects an item in the 317 // We let it keep 1 entry because FrameLoader::goToItem expects an item in the
318 // backForwardList, which is used only in ASSERTs. 318 // backForwardList, which is used only in ASSERTs.
319 webview()->SetBackForwardListSize(1); 319 webview()->SetBackForwardListSize(1);
(...skipping 2448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2768 main_frame->enableViewSourceMode(true); 2768 main_frame->enableViewSourceMode(true);
2769 } 2769 }
2770 2770
2771 void RenderView::OnEnableIntrinsicWidthChangedMode() { 2771 void RenderView::OnEnableIntrinsicWidthChangedMode() {
2772 send_preferred_width_changes_ = true; 2772 send_preferred_width_changes_ = true;
2773 } 2773 }
2774 2774
2775 void RenderView::OnSetRendererPrefs(const RendererPreferences& renderer_prefs) { 2775 void RenderView::OnSetRendererPrefs(const RendererPreferences& renderer_prefs) {
2776 renderer_preferences_ = renderer_prefs; 2776 renderer_preferences_ = renderer_prefs;
2777 UpdateFontRenderingFromRendererPrefs(); 2777 UpdateFontRenderingFromRendererPrefs();
2778 webview()->SetThemeFocusRingColor(renderer_prefs.focus_ring_color_r,
2779 renderer_prefs.focus_ring_color_g,
2780 renderer_prefs.focus_ring_color_b);
2781
2778 } 2782 }
2779 2783
2780 void RenderView::OnMediaPlayerActionAt(int x, 2784 void RenderView::OnMediaPlayerActionAt(int x,
2781 int y, 2785 int y,
2782 const MediaPlayerAction& action) { 2786 const MediaPlayerAction& action) {
2783 if (!webview()) 2787 if (!webview())
2784 return; 2788 return;
2785 2789
2786 webview()->MediaPlayerActionAt(x, y, action); 2790 webview()->MediaPlayerActionAt(x, y, action);
2787 } 2791 }
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
3337 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); 3341 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms));
3338 } 3342 }
3339 3343
3340 void RenderView::Print(WebFrame* frame, bool script_initiated) { 3344 void RenderView::Print(WebFrame* frame, bool script_initiated) {
3341 DCHECK(frame); 3345 DCHECK(frame);
3342 if (print_helper_.get() == NULL) { 3346 if (print_helper_.get() == NULL) {
3343 print_helper_.reset(new PrintWebViewHelper(this)); 3347 print_helper_.reset(new PrintWebViewHelper(this));
3344 } 3348 }
3345 print_helper_->Print(frame, script_initiated); 3349 print_helper_->Print(frame, script_initiated);
3346 } 3350 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698