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

Side by Side Diff: chrome/browser/ui/views/toolbar/browser_action_view.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/views/toolbar/browser_action_view.h" 5 #include "chrome/browser/ui/views/toolbar/browser_action_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/extensions/api/commands/command_service.h" 9 #include "chrome/browser/extensions/api/commands/command_service.h"
10 #include "chrome/browser/extensions/dev_mode_bubble_controller.h" 10 #include "chrome/browser/extensions/dev_mode_bubble_controller.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 : MenuButton(this, base::string16(), NULL, false), 116 : MenuButton(this, base::string16(), NULL, false),
117 browser_(browser), 117 browser_(browser),
118 browser_action_( 118 browser_action_(
119 extensions::ExtensionActionManager::Get(browser->profile())-> 119 extensions::ExtensionActionManager::Get(browser->profile())->
120 GetBrowserAction(*extension)), 120 GetBrowserAction(*extension)),
121 extension_(extension), 121 extension_(extension),
122 icon_factory_(browser->profile(), extension, browser_action_, this), 122 icon_factory_(browser->profile(), extension, browser_action_, this),
123 delegate_(delegate), 123 delegate_(delegate),
124 context_menu_(NULL), 124 context_menu_(NULL),
125 called_registered_extension_command_(false) { 125 called_registered_extension_command_(false) {
126 set_border(NULL); 126 SetBorder(views::Border::NullBorder());
127 set_alignment(TextButton::ALIGN_CENTER); 127 set_alignment(TextButton::ALIGN_CENTER);
128 set_context_menu_controller(this); 128 set_context_menu_controller(this);
129 129
130 // No UpdateState() here because View hierarchy not setup yet. Our parent 130 // No UpdateState() here because View hierarchy not setup yet. Our parent
131 // should call UpdateState() after creation. 131 // should call UpdateState() after creation.
132 132
133 content::NotificationSource notification_source = 133 content::NotificationSource notification_source =
134 content::Source<Profile>(browser_->profile()->GetOriginalProfile()); 134 content::Source<Profile>(browser_->profile()->GetOriginalProfile());
135 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED, 135 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
136 content::Source<ExtensionAction>(browser_action_)); 136 content::Source<ExtensionAction>(browser_action_));
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 extensions::Command browser_action_command; 426 extensions::Command browser_action_command;
427 if (!only_if_active || !command_service->GetBrowserActionCommand( 427 if (!only_if_active || !command_service->GetBrowserActionCommand(
428 extension_->id(), 428 extension_->id(),
429 extensions::CommandService::ACTIVE_ONLY, 429 extensions::CommandService::ACTIVE_ONLY,
430 &browser_action_command, 430 &browser_action_command,
431 NULL)) { 431 NULL)) {
432 GetFocusManager()->UnregisterAccelerator(*keybinding_.get(), this); 432 GetFocusManager()->UnregisterAccelerator(*keybinding_.get(), this);
433 keybinding_.reset(NULL); 433 keybinding_.reset(NULL);
434 } 434 }
435 } 435 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/back_button.cc ('k') | chrome/browser/ui/views/toolbar/browser_actions_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698