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

Side by Side Diff: Source/core/inspector/InspectorOverlay.cpp

Issue 22955006: Chrome::client() should return a ChromeClient reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "core/rendering/RenderInline.h" 52 #include "core/rendering/RenderInline.h"
53 #include "core/rendering/RenderObject.h" 53 #include "core/rendering/RenderObject.h"
54 #include "wtf/text/StringBuilder.h" 54 #include "wtf/text/StringBuilder.h"
55 55
56 namespace WebCore { 56 namespace WebCore {
57 57
58 namespace { 58 namespace {
59 59
60 class InspectorOverlayChromeClient: public EmptyChromeClient { 60 class InspectorOverlayChromeClient: public EmptyChromeClient {
61 public: 61 public:
62 InspectorOverlayChromeClient(ChromeClient* client, InspectorOverlay* overlay ) 62 InspectorOverlayChromeClient(ChromeClient& client, InspectorOverlay* overlay )
63 : m_client(client) 63 : m_client(client)
64 , m_overlay(overlay) 64 , m_overlay(overlay)
65 { } 65 { }
66 66
67 virtual void setCursor(const Cursor& cursor) 67 virtual void setCursor(const Cursor& cursor)
68 { 68 {
69 m_client->setCursor(cursor); 69 m_client.setCursor(cursor);
70 } 70 }
71 71
72 virtual void setToolTip(const String& tooltip, TextDirection direction) 72 virtual void setToolTip(const String& tooltip, TextDirection direction)
73 { 73 {
74 m_client->setToolTip(tooltip, direction); 74 m_client.setToolTip(tooltip, direction);
75 } 75 }
76 76
77 virtual void invalidateRootView(const IntRect& rect) 77 virtual void invalidateRootView(const IntRect& rect)
78 { 78 {
79 m_overlay->invalidate(); 79 m_overlay->invalidate();
80 } 80 }
81 81
82 virtual void invalidateContentsAndRootView(const IntRect& rect) 82 virtual void invalidateContentsAndRootView(const IntRect& rect)
83 { 83 {
84 m_overlay->invalidate(); 84 m_overlay->invalidate();
85 } 85 }
86 86
87 virtual void invalidateContentsForSlowScroll(const IntRect& rect) 87 virtual void invalidateContentsForSlowScroll(const IntRect& rect)
88 { 88 {
89 m_overlay->invalidate(); 89 m_overlay->invalidate();
90 } 90 }
91
91 private: 92 private:
92 ChromeClient* m_client; 93 ChromeClient& m_client;
93 InspectorOverlay* m_overlay; 94 InspectorOverlay* m_overlay;
94 }; 95 };
95 96
96 Path quadToPath(const FloatQuad& quad) 97 Path quadToPath(const FloatQuad& quad)
97 { 98 {
98 Path quadPath; 99 Path quadPath;
99 quadPath.moveTo(quad.p1()); 100 quadPath.moveTo(quad.p1());
100 quadPath.addLineTo(quad.p2()); 101 quadPath.addLineTo(quad.p2());
101 quadPath.addLineTo(quad.p3()); 102 quadPath.addLineTo(quad.p3());
102 quadPath.addLineTo(quad.p4()); 103 quadPath.addLineTo(quad.p4());
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 670
670 void InspectorOverlay::freePage() 671 void InspectorOverlay::freePage()
671 { 672 {
672 m_overlayPage.clear(); 673 m_overlayPage.clear();
673 m_overlayChromeClient.clear(); 674 m_overlayChromeClient.clear();
674 m_timer.stop(); 675 m_timer.stop();
675 } 676 }
676 677
677 } // namespace WebCore 678 } // namespace WebCore
678 679
OLDNEW
« no previous file with comments | « Source/core/html/shadow/PasswordGeneratorButtonElement.cpp ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698