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

Side by Side Diff: chrome/browser/ui/panels/panel.cc

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (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
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 "chrome/browser/ui/panels/panel.h" 5 #include "chrome/browser/ui/panels/panel.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "ui/gfx/rect.h" 44 #include "ui/gfx/rect.h"
45 45
46 using base::UserMetricsAction; 46 using base::UserMetricsAction;
47 using content::RenderViewHost; 47 using content::RenderViewHost;
48 48
49 namespace panel_internal { 49 namespace panel_internal {
50 50
51 class PanelExtensionWindowController : public extensions::WindowController { 51 class PanelExtensionWindowController : public extensions::WindowController {
52 public: 52 public:
53 PanelExtensionWindowController(Panel* panel, Profile* profile); 53 PanelExtensionWindowController(Panel* panel, Profile* profile);
54 virtual ~PanelExtensionWindowController(); 54 ~PanelExtensionWindowController() override;
55 55
56 // Overridden from extensions::WindowController. 56 // Overridden from extensions::WindowController.
57 virtual int GetWindowId() const override; 57 int GetWindowId() const override;
58 virtual std::string GetWindowTypeText() const override; 58 std::string GetWindowTypeText() const override;
59 virtual base::DictionaryValue* CreateWindowValueWithTabs( 59 base::DictionaryValue* CreateWindowValueWithTabs(
60 const extensions::Extension* extension) const override; 60 const extensions::Extension* extension) const override;
61 virtual base::DictionaryValue* CreateTabValue( 61 base::DictionaryValue* CreateTabValue(const extensions::Extension* extension,
62 const extensions::Extension* extension, int tab_index) const override; 62 int tab_index) const override;
63 virtual bool CanClose(Reason* reason) const override; 63 bool CanClose(Reason* reason) const override;
64 virtual void SetFullscreenMode(bool is_fullscreen, 64 void SetFullscreenMode(bool is_fullscreen,
65 const GURL& extension_url) const override; 65 const GURL& extension_url) const override;
66 virtual bool IsVisibleToExtension( 66 bool IsVisibleToExtension(
67 const extensions::Extension* extension) const override; 67 const extensions::Extension* extension) const override;
68 68
69 private: 69 private:
70 Panel* panel_; // Weak pointer. Owns us. 70 Panel* panel_; // Weak pointer. Owns us.
71 DISALLOW_COPY_AND_ASSIGN(PanelExtensionWindowController); 71 DISALLOW_COPY_AND_ASSIGN(PanelExtensionWindowController);
72 }; 72 };
73 73
74 PanelExtensionWindowController::PanelExtensionWindowController( 74 PanelExtensionWindowController::PanelExtensionWindowController(
75 Panel* panel, Profile* profile) 75 Panel* panel, Profile* profile)
76 : extensions::WindowController(panel, profile), 76 : extensions::WindowController(panel, profile),
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 // static 900 // static
901 void Panel::FormatTitleForDisplay(base::string16* title) { 901 void Panel::FormatTitleForDisplay(base::string16* title) {
902 size_t current_index = 0; 902 size_t current_index = 0;
903 size_t match_index; 903 size_t match_index;
904 while ((match_index = title->find(L'\n', current_index)) != 904 while ((match_index = title->find(L'\n', current_index)) !=
905 base::string16::npos) { 905 base::string16::npos) {
906 title->replace(match_index, 1, base::string16()); 906 title->replace(match_index, 1, base::string16());
907 current_index = match_index; 907 current_index = match_index;
908 } 908 }
909 } 909 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698