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

Side by Side Diff: content/public/browser/web_contents_observer.h

Issue 671663002: Standardize usage of virtual/override/final in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « content/public/browser/web_contents.h ('k') | content/public/common/child_process_host.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 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
7 7
8 #include "base/process/kill.h" 8 #include "base/process/kill.h"
9 #include "base/process/process_handle.h" 9 #include "base/process/process_handle.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 const std::vector<AXEventNotificationDetails>& details) {} 316 const std::vector<AXEventNotificationDetails>& details) {}
317 317
318 // Invoked when theme color is changed to |theme_color|. 318 // Invoked when theme color is changed to |theme_color|.
319 virtual void DidChangeThemeColor(SkColor theme_color) {} 319 virtual void DidChangeThemeColor(SkColor theme_color) {}
320 320
321 // Invoked if an IPC message is coming from a specific RenderFrameHost. 321 // Invoked if an IPC message is coming from a specific RenderFrameHost.
322 virtual bool OnMessageReceived(const IPC::Message& message, 322 virtual bool OnMessageReceived(const IPC::Message& message,
323 RenderFrameHost* render_frame_host); 323 RenderFrameHost* render_frame_host);
324 324
325 // IPC::Listener implementation. 325 // IPC::Listener implementation.
326 virtual bool OnMessageReceived(const IPC::Message& message) override; 326 bool OnMessageReceived(const IPC::Message& message) override;
327 327
328 // IPC::Sender implementation. 328 // IPC::Sender implementation.
329 virtual bool Send(IPC::Message* message) override; 329 bool Send(IPC::Message* message) override;
330 int routing_id() const; 330 int routing_id() const;
331 331
332 WebContents* web_contents() const; 332 WebContents* web_contents() const;
333 333
334 protected: 334 protected:
335 // Use this constructor when the object is tied to a single WebContents for 335 // Use this constructor when the object is tied to a single WebContents for
336 // its entire lifetime. 336 // its entire lifetime.
337 explicit WebContentsObserver(WebContents* web_contents); 337 explicit WebContentsObserver(WebContents* web_contents);
338 338
339 // Use this constructor when the object wants to observe a WebContents for 339 // Use this constructor when the object wants to observe a WebContents for
340 // part of its lifetime. It can then call Observe() to start and stop 340 // part of its lifetime. It can then call Observe() to start and stop
341 // observing. 341 // observing.
342 WebContentsObserver(); 342 WebContentsObserver();
343 343
344 virtual ~WebContentsObserver(); 344 ~WebContentsObserver() override;
345 345
346 // Start observing a different WebContents; used with the default constructor. 346 // Start observing a different WebContents; used with the default constructor.
347 void Observe(WebContents* web_contents); 347 void Observe(WebContents* web_contents);
348 348
349 private: 349 private:
350 friend class WebContentsImpl; 350 friend class WebContentsImpl;
351 351
352 void ResetWebContents(); 352 void ResetWebContents();
353 353
354 WebContentsImpl* web_contents_; 354 WebContentsImpl* web_contents_;
355 355
356 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); 356 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver);
357 }; 357 };
358 358
359 } // namespace content 359 } // namespace content
360 360
361 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 361 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/public/browser/web_contents.h ('k') | content/public/common/child_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698