summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-13 17:52:48 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-13 17:52:48 +0000
commit00ffe5dd99527a0cb1035af6749417f5fb1c134e (patch)
tree4354d5b35be202204d9392417862b423ba374ce0 /chrome/browser
parent65f73a3a996bdbaa167e38704df092aa39b53d3a (diff)
downloadchromium_src-00ffe5dd99527a0cb1035af6749417f5fb1c134e.zip
chromium_src-00ffe5dd99527a0cb1035af6749417f5fb1c134e.tar.gz
chromium_src-00ffe5dd99527a0cb1035af6749417f5fb1c134e.tar.bz2
Revert 15965. I wasn't supposed to check that in since it still doesn't compile on linux and mac!
TBR=sky Review URL: http://codereview.chromium.org/113351 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15967 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_main.cc5
-rw-r--r--chrome/browser/first_run.cc4
-rw-r--r--chrome/browser/history/history_publisher.cc2
-rw-r--r--chrome/browser/history/history_publisher.h10
-rw-r--r--chrome/browser/history/history_publisher_win.cc5
-rw-r--r--chrome/browser/input_window_dialog_win.cc3
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_win.h2
-rw-r--r--chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc2
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc2
-rw-r--r--chrome/browser/views/bookmark_bar_view.h2
-rw-r--r--chrome/browser/views/bookmark_folder_tree_view.cc2
-rw-r--r--chrome/browser/views/bookmark_manager_view.cc10
-rw-r--r--chrome/browser/views/bookmark_manager_view.h2
-rw-r--r--chrome/browser/views/bookmark_menu_button.cc6
-rw-r--r--chrome/browser/views/bookmark_menu_button.h4
-rw-r--r--chrome/browser/views/bookmark_table_view.cc9
-rw-r--r--chrome/browser/views/download_item_view.cc2
-rw-r--r--chrome/browser/views/frame/browser_frame.h1
-rw-r--r--chrome/browser/views/hung_renderer_view.cc12
-rw-r--r--chrome/browser/views/infobars/infobars.cc5
-rw-r--r--chrome/browser/views/login_view.cc7
-rw-r--r--chrome/browser/views/options/content_page_view.cc7
-rw-r--r--chrome/browser/views/options/cookies_view.cc6
-rw-r--r--chrome/browser/views/options/exceptions_page_view.cc10
-rw-r--r--chrome/browser/views/options/fonts_page_view.cc3
-rw-r--r--chrome/browser/views/options/general_page_view.cc3
-rw-r--r--chrome/browser/views/options/passwords_page_view.cc14
-rw-r--r--chrome/browser/views/page_info_window.cc4
-rw-r--r--chrome/browser/views/select_profile_dialog.cc2
-rw-r--r--chrome/browser/views/tabs/tab.cc6
-rw-r--r--chrome/browser/views/tabs/tab.h2
-rw-r--r--chrome/browser/views/tabs/tab_renderer.cc6
-rw-r--r--chrome/browser/views/toolbar_view.cc10
-rw-r--r--chrome/browser/views/toolbar_view.h6
-rw-r--r--chrome/browser/views/user_data_dir_dialog.cc3
35 files changed, 76 insertions, 103 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index e83f54f..1bde447 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -4,11 +4,6 @@
#include "build/build_config.h"
-#if defined(OS_WIN)
-#include <windows.h>
-#include <commctrl.h>
-#endif
-
#include <algorithm>
#include "app/l10n_util.h"
diff --git a/chrome/browser/first_run.cc b/chrome/browser/first_run.cc
index d00ee47..6304609 100644
--- a/chrome/browser/first_run.cc
+++ b/chrome/browser/first_run.cc
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/first_run.h"
-
#include <atlbase.h>
#include <atlcom.h>
#include <windows.h>
@@ -11,6 +9,8 @@
#include <sstream>
+#include "chrome/browser/first_run.h"
+
#include "app/resource_bundle.h"
#include "base/command_line.h"
#include "base/file_util.h"
diff --git a/chrome/browser/history/history_publisher.cc b/chrome/browser/history/history_publisher.cc
index 364bb821..52327c5 100644
--- a/chrome/browser/history/history_publisher.cc
+++ b/chrome/browser/history/history_publisher.cc
@@ -6,7 +6,7 @@
namespace history {
-const char* const HistoryPublisher::kThumbnailImageFormat = "image/jpeg";
+const char* HistoryPublisher::kThumbnailImageFormat = "image/jpeg";
void HistoryPublisher::PublishPageThumbnail(
const std::vector<unsigned char>& thumbnail, const GURL& url,
diff --git a/chrome/browser/history/history_publisher.h b/chrome/browser/history/history_publisher.h
index 00090659..71005e5 100644
--- a/chrome/browser/history/history_publisher.h
+++ b/chrome/browser/history/history_publisher.h
@@ -8,12 +8,14 @@
#include <vector>
#include <string>
-#include "base/scoped_comptr_win.h"
+#include "base/basictypes.h"
#include "base/time.h"
#include "chrome/browser/history/history_types.h"
#include "googleurl/src/gurl.h"
#if defined(OS_WIN)
+#include <atlbase.h>
+#include <atlcomcli.h>
#include "history_indexer.h"
#endif
@@ -58,18 +60,18 @@ class HistoryPublisher {
// Returns '0' if the time object is NULL.
static double TimeToUTCVariantTime(const base::Time& time);
- typedef std::vector< ScopedComPtr<IChromeHistoryIndexer> > IndexerList;
+ typedef std::vector<CComPtr<IChromeHistoryIndexer> > IndexerList;
// The list of indexers registered to receive history data from us.
IndexerList indexers_;
// The Registry key under HKCU where the indexers need to register their
// CLSID.
- static const wchar_t* const kRegKeyRegisteredIndexersInfo;
+ static const wchar_t* kRegKeyRegisteredIndexersInfo;
#endif
// The format of the thumbnail we pass to indexers.
- static const char* const kThumbnailImageFormat;
+ static const char* kThumbnailImageFormat;
DISALLOW_COPY_AND_ASSIGN(HistoryPublisher);
};
diff --git a/chrome/browser/history/history_publisher_win.cc b/chrome/browser/history/history_publisher_win.cc
index ef4fb7f..72c0f1d 100644
--- a/chrome/browser/history/history_publisher_win.cc
+++ b/chrome/browser/history/history_publisher_win.cc
@@ -10,11 +10,10 @@
#include <wtypes.h>
#include "base/registry.h"
-#include "base/scoped_comptr_win.h"
namespace history {
-const wchar_t* const HistoryPublisher::kRegKeyRegisteredIndexersInfo =
+const wchar_t* HistoryPublisher::kRegKeyRegisteredIndexersInfo =
L"Software\\Google\\Google Chrome\\IndexerPlugins";
// static
@@ -61,7 +60,7 @@ bool HistoryPublisher::ReadRegisteredIndexersFromRegistry() {
CLSID clsid;
CLSIDFromString(static_cast<LPOLESTR>(
const_cast<TCHAR*>(iter.Name())), &clsid);
- ScopedComPtr<IChromeHistoryIndexer> indexer;
+ CComPtr<IChromeHistoryIndexer> indexer;
HRESULT hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC,
__uuidof(IChromeHistoryIndexer),
reinterpret_cast<void**>(&indexer));
diff --git a/chrome/browser/input_window_dialog_win.cc b/chrome/browser/input_window_dialog_win.cc
index 2da360a..d236cc9 100644
--- a/chrome/browser/input_window_dialog_win.cc
+++ b/chrome/browser/input_window_dialog_win.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/input_window_dialog.h"
#include "app/l10n_util.h"
-#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/task.h"
#include "views/grid_layout.h"
@@ -61,7 +60,7 @@ class ContentView : public views::View,
public:
explicit ContentView(WinInputWindowDialog* delegate)
: delegate_(delegate),
- ALLOW_THIS_IN_INITIALIZER_LIST(focus_grabber_factory_(this)) {
+ focus_grabber_factory_(this) {
DCHECK(delegate_);
}
diff --git a/chrome/browser/tab_contents/tab_contents_view_win.h b/chrome/browser/tab_contents/tab_contents_view_win.h
index 4166891..6e36549 100644
--- a/chrome/browser/tab_contents/tab_contents_view_win.h
+++ b/chrome/browser/tab_contents/tab_contents_view_win.h
@@ -64,7 +64,7 @@ class TabContentsViewWin : public TabContentsView,
virtual void OnSetFocus(HWND window);
virtual void OnVScroll(int scroll_type, short position, HWND scrollbar);
virtual void OnWindowPosChanged(WINDOWPOS* window_pos);
- virtual void OnSize(UINT param, const WTL::CSize& size);
+ virtual void OnSize(UINT param, const CSize& size);
virtual LRESULT OnNCCalcSize(BOOL w_param, LPARAM l_param);
virtual void OnNCPaint(HRGN rgn);
diff --git a/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
index f4d9e9e..d62465f 100644
--- a/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
+++ b/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h"
-#include <objidl.h>
-#include <commctrl.h>
#include <dwmapi.h>
#include "app/gfx/chrome_canvas.h"
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 71b4051..88264f2 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -1093,7 +1093,7 @@ int BookmarkBarView::GetDragOperations(View* sender, int x, int y) {
}
void BookmarkBarView::RunMenu(views::View* view,
- const gfx::Point& pt,
+ const CPoint& pt,
HWND hwnd) {
BookmarkNode* node;
MenuItemView::AnchorPosition anchor_point = MenuItemView::TOPLEFT;
diff --git a/chrome/browser/views/bookmark_bar_view.h b/chrome/browser/views/bookmark_bar_view.h
index ccf787e..a56f51a 100644
--- a/chrome/browser/views/bookmark_bar_view.h
+++ b/chrome/browser/views/bookmark_bar_view.h
@@ -300,7 +300,7 @@ class BookmarkBarView : public views::View,
// . menu for star groups.
// The latter two are handled by a MenuRunner, which builds the appropriate
// menu.
- virtual void RunMenu(views::View* view, const gfx::Point& pt, HWND hwnd);
+ virtual void RunMenu(views::View* view, const CPoint& pt, HWND hwnd);
// Invoked when a star entry corresponding to a URL on the bookmark bar is
// pressed. Forwards to the PageNavigator to open the URL.
diff --git a/chrome/browser/views/bookmark_folder_tree_view.cc b/chrome/browser/views/bookmark_folder_tree_view.cc
index 801973f..e092670 100644
--- a/chrome/browser/views/bookmark_folder_tree_view.cc
+++ b/chrome/browser/views/bookmark_folder_tree_view.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/views/bookmark_folder_tree_view.h"
-#include <commctrl.h>
-
#include "app/drag_drop_types.h"
#include "app/os_exchange_data.h"
#include "base/base_drag_source.h"
diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc
index 6831f11..d635932 100644
--- a/chrome/browser/views/bookmark_manager_view.cc
+++ b/chrome/browser/views/bookmark_manager_view.cc
@@ -137,7 +137,7 @@ BookmarkManagerView::BookmarkManagerView(Profile* profile)
: profile_(profile->GetOriginalProfile()),
table_view_(NULL),
tree_view_(NULL),
- ALLOW_THIS_IN_INITIALIZER_LIST(search_factory_(this)) {
+ search_factory_(this) {
search_tf_ = new views::TextField();
search_tf_->set_default_width_in_chars(30);
@@ -479,7 +479,7 @@ void BookmarkManagerView::ShowContextMenu(views::View* source,
}
void BookmarkManagerView::RunMenu(views::View* source,
- const gfx::Point& pt,
+ const CPoint& pt,
HWND hwnd) {
// TODO(glen): when you change the buttons around and what not, futz with
// this to make it look good. If you end up keeping padding numbers make them
@@ -487,14 +487,14 @@ void BookmarkManagerView::RunMenu(views::View* source,
if (!GetBookmarkModel()->IsLoaded())
return;
- int menu_x = pt.x();
+ int menu_x = pt.x;
menu_x += UILayoutIsRightToLeft() ? (source->width() - 5) :
(-source->width() + 5);
if (source->GetID() == kOrganizeMenuButtonID) {
- ShowMenu(hwnd, menu_x, pt.y() + 2,
+ ShowMenu(hwnd, menu_x, pt.y + 2,
BookmarkContextMenu::BOOKMARK_MANAGER_ORGANIZE_MENU);
} else if (source->GetID() == kToolsMenuButtonID) {
- ShowToolsMenu(hwnd, menu_x, pt.y() + 2);
+ ShowToolsMenu(hwnd, menu_x, pt.y + 2);
} else {
NOTREACHED();
}
diff --git a/chrome/browser/views/bookmark_manager_view.h b/chrome/browser/views/bookmark_manager_view.h
index 33566a4..a624281 100644
--- a/chrome/browser/views/bookmark_manager_view.h
+++ b/chrome/browser/views/bookmark_manager_view.h
@@ -147,7 +147,7 @@ class BookmarkManagerView : public views::View,
bool is_mouse_gesture);
// ViewMenuDelegate.
- virtual void RunMenu(views::View* source, const gfx::Point& pt, HWND hwnd);
+ virtual void RunMenu(views::View* source, const CPoint& pt, HWND hwnd);
// MenuDelegate.
virtual void ExecuteCommand(int id);
diff --git a/chrome/browser/views/bookmark_menu_button.cc b/chrome/browser/views/bookmark_menu_button.cc
index 3f6c43a..0074e61 100644
--- a/chrome/browser/views/bookmark_menu_button.cc
+++ b/chrome/browser/views/bookmark_menu_button.cc
@@ -93,13 +93,13 @@ void BookmarkMenuButton::BookmarkMenuDeleted(
}
void BookmarkMenuButton::RunMenu(views::View* source,
- const gfx::Point& pt,
+ const CPoint& pt,
gfx::NativeView hwnd) {
RunMenu(source, pt, hwnd, false);
}
void BookmarkMenuButton::RunMenu(views::View* source,
- const gfx::Point& pt,
+ const CPoint& pt,
gfx::NativeView hwnd,
bool for_drop) {
Profile* profile = browser_->profile();
@@ -141,5 +141,5 @@ void BookmarkMenuButton::StopShowFolderDropMenuTimer() {
}
void BookmarkMenuButton::ShowDropMenu() {
- RunMenu(NULL, gfx::Point(), GetWidget()->GetNativeView(), true);
+ RunMenu(NULL, CPoint(), GetWidget()->GetNativeView(), true);
}
diff --git a/chrome/browser/views/bookmark_menu_button.h b/chrome/browser/views/bookmark_menu_button.h
index 3f2a98e..0ebb59f 100644
--- a/chrome/browser/views/bookmark_menu_button.h
+++ b/chrome/browser/views/bookmark_menu_button.h
@@ -36,13 +36,13 @@ class BookmarkMenuButton : public views::MenuButton,
// ViewMenuDelegate.
virtual void RunMenu(views::View* source,
- const gfx::Point& pt,
+ const CPoint& pt,
gfx::NativeView hwnd);
private:
// Shows the menu.
void RunMenu(views::View* source,
- const gfx::Point& pt,
+ const CPoint& pt,
gfx::NativeView hwnd,
bool for_drop);
diff --git a/chrome/browser/views/bookmark_table_view.cc b/chrome/browser/views/bookmark_table_view.cc
index edbedf0..c1b4023 100644
--- a/chrome/browser/views/bookmark_table_view.cc
+++ b/chrome/browser/views/bookmark_table_view.cc
@@ -4,8 +4,6 @@
#include "chrome/browser/views/bookmark_table_view.h"
-#include <commctrl.h>
-
#include "app/drag_drop_types.h"
#include "app/gfx/chrome_canvas.h"
#include "app/gfx/chrome_font.h"
@@ -432,12 +430,11 @@ void BookmarkTableView::PaintAltText() {
gfx::Rect BookmarkTableView::GetAltTextBounds() {
static const int kXOffset = 16;
DCHECK(GetNativeControlHWND());
- RECT client_rect_rect;
- GetClientRect(GetNativeControlHWND(), &client_rect_rect);
- gfx::Rect client_rect(client_rect_rect);
+ CRect client_rect;
+ GetClientRect(GetNativeControlHWND(), client_rect);
ChromeFont font = GetAltTextFont();
// Pad height by 2 for halo.
- return gfx::Rect(kXOffset, content_offset(), client_rect.width() - kXOffset,
+ return gfx::Rect(kXOffset, content_offset(), client_rect.Width() - kXOffset,
std::max(kImageSize, font.height() + 2));
}
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc
index 7aa2a37..915e78f 100644
--- a/chrome/browser/views/download_item_view.cc
+++ b/chrome/browser/views/download_item_view.cc
@@ -143,7 +143,7 @@ DownloadItemView::DownloadItemView(DownloadItem* download,
dangerous_download_label_(NULL),
dangerous_download_label_sized_(false),
creation_time_(base::Time::Now()),
- ALLOW_THIS_IN_INITIALIZER_LIST(reenable_method_factory_(this)),
+ reenable_method_factory_(this),
disabled_while_opening_(false) {
// TODO(idana) Bug# 1163334
//
diff --git a/chrome/browser/views/frame/browser_frame.h b/chrome/browser/views/frame/browser_frame.h
index fdb5e49..792e90e 100644
--- a/chrome/browser/views/frame/browser_frame.h
+++ b/chrome/browser/views/frame/browser_frame.h
@@ -6,7 +6,6 @@
#define CHROME_BROWSER_VIEWS_FRAME_BROWSER_FRAME_
#include "views/window/window_win.h"
-#include "views/window/non_client_view.h"
class AeroGlassNonClientView;
class BrowserView;
diff --git a/chrome/browser/views/hung_renderer_view.cc b/chrome/browser/views/hung_renderer_view.cc
index 4c1397a..20c7e06 100644
--- a/chrome/browser/views/hung_renderer_view.cc
+++ b/chrome/browser/views/hung_renderer_view.cc
@@ -405,14 +405,14 @@ void HungRendererDialogView::CreateKillButtonView() {
gfx::Rect HungRendererDialogView::GetDisplayBounds(
TabContents* contents) {
HWND contents_hwnd = contents->GetNativeView();
- RECT contents_bounds_rect;
- GetWindowRect(contents_hwnd, &contents_bounds_rect);
- gfx::Rect contents_bounds(contents_bounds_rect);
+ CRect contents_bounds;
+ GetWindowRect(contents_hwnd, &contents_bounds);
+
gfx::Rect window_bounds = window()->GetBounds();
- int window_x = contents_bounds.x() +
- (contents_bounds.width() - window_bounds.width()) / 2;
- int window_y = contents_bounds.y() + kOverlayContentsOffsetY;
+ int window_x = contents_bounds.left +
+ (contents_bounds.Width() - window_bounds.width()) / 2;
+ int window_y = contents_bounds.top + kOverlayContentsOffsetY;
return gfx::Rect(window_x, window_y, window_bounds.width(),
window_bounds.height());
}
diff --git a/chrome/browser/views/infobars/infobars.cc b/chrome/browser/views/infobars/infobars.cc
index f14aded..6749dec 100644
--- a/chrome/browser/views/infobars/infobars.cc
+++ b/chrome/browser/views/infobars/infobars.cc
@@ -84,9 +84,8 @@ class InfoBarBackground : public views::Background {
InfoBar::InfoBar(InfoBarDelegate* delegate)
: delegate_(delegate),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- close_button_(new views::ImageButton(this))),
- ALLOW_THIS_IN_INITIALIZER_LIST(delete_factory_(this)) {
+ close_button_(new views::ImageButton(this)),
+ delete_factory_(this) {
// We delete ourselves when we're removed from the view hierarchy.
SetParentOwned(false);
diff --git a/chrome/browser/views/login_view.cc b/chrome/browser/views/login_view.cc
index df7f1b4..cab7ba2 100644
--- a/chrome/browser/views/login_view.cc
+++ b/chrome/browser/views/login_view.cc
@@ -2,12 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/views/login_view.h"
-
#include <string>
+#include "chrome/browser/views/login_view.h"
+
#include "app/l10n_util.h"
-#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "grit/generated_resources.h"
#include "views/grid_layout.h"
@@ -32,7 +31,7 @@ LoginView::LoginView(const std::wstring& explanation)
password_label_(new Label(
l10n_util::GetString(IDS_LOGIN_DIALOG_PASSWORD_FIELD))),
message_label_(new Label(explanation)),
- ALLOW_THIS_IN_INITIALIZER_LIST(focus_grabber_factory_(this)),
+ focus_grabber_factory_(this),
login_model_(NULL) {
message_label_->SetMultiLine(true);
message_label_->SetHorizontalAlignment(Label::ALIGN_LEFT);
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index ef822ee12..abd1d9b 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/views/options/content_page_view.h"
-
#include <windows.h>
#include <shlobj.h>
#include <vsstyle.h>
#include <vssym32.h>
+#include "chrome/browser/views/options/content_page_view.h"
+
#include "app/gfx/chrome_canvas.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
@@ -176,8 +176,7 @@ ContentPageView::ContentPageView(Profile* profile)
download_default_download_location_display_(NULL),
download_browse_button_(NULL),
download_ask_for_save_location_checkbox_(NULL),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- select_file_dialog_(SelectFileDialog::Create(this))),
+ select_file_dialog_(SelectFileDialog::Create(this)),
passwords_exceptions_button_(NULL),
passwords_group_(NULL),
passwords_asktosave_radio_(NULL),
diff --git a/chrome/browser/views/options/cookies_view.cc b/chrome/browser/views/options/cookies_view.cc
index a294fff..cc8d65c 100644
--- a/chrome/browser/views/options/cookies_view.cc
+++ b/chrome/browser/views/options/cookies_view.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/views/options/cookies_view.h"
-
#include <algorithm>
+#include "chrome/browser/views/options/cookies_view.h"
+
#include "app/gfx/chrome_canvas.h"
#include "app/gfx/color_utils.h"
#include "app/l10n_util.h"
@@ -697,7 +697,7 @@ CookiesView::CookiesView(Profile* profile)
remove_button_(NULL),
remove_all_button_(NULL),
profile_(profile),
- ALLOW_THIS_IN_INITIALIZER_LIST(search_update_factory_(this)) {
+ search_update_factory_(this) {
}
void CookiesView::Init() {
diff --git a/chrome/browser/views/options/exceptions_page_view.cc b/chrome/browser/views/options/exceptions_page_view.cc
index ecc9884..daff30e 100644
--- a/chrome/browser/views/options/exceptions_page_view.cc
+++ b/chrome/browser/views/options/exceptions_page_view.cc
@@ -77,12 +77,10 @@ void ExceptionsTableModel::OnWebDataServiceRequestDone(
// ExceptionsPageView, public
ExceptionsPageView::ExceptionsPageView(Profile* profile)
: OptionsPageView(profile),
- ALLOW_THIS_IN_INITIALIZER_LIST(remove_button_(
- this,
- l10n_util::GetString(IDS_EXCEPTIONS_PAGE_VIEW_REMOVE_BUTTON))),
- ALLOW_THIS_IN_INITIALIZER_LIST(remove_all_button_(
- this,
- l10n_util::GetString(IDS_EXCEPTIONS_PAGE_VIEW_REMOVE_ALL_BUTTON))),
+ remove_button_(this, l10n_util::GetString(
+ IDS_EXCEPTIONS_PAGE_VIEW_REMOVE_BUTTON)),
+ remove_all_button_(this, l10n_util::GetString(
+ IDS_EXCEPTIONS_PAGE_VIEW_REMOVE_ALL_BUTTON)),
table_model_(profile),
table_view_(NULL) {
}
diff --git a/chrome/browser/views/options/fonts_page_view.cc b/chrome/browser/views/options/fonts_page_view.cc
index 27d710a..09db2ff 100644
--- a/chrome/browser/views/options/fonts_page_view.cc
+++ b/chrome/browser/views/options/fonts_page_view.cc
@@ -209,8 +209,7 @@ void EmbellishTitle(views::Label* title_label) {
}
FontsPageView::FontsPageView(Profile* profile)
- : ALLOW_THIS_IN_INITIALIZER_LIST(
- select_font_dialog_(SelectFontDialog::Create(this))),
+ : select_font_dialog_(SelectFontDialog::Create(this)),
fonts_group_title_(NULL),
encoding_group_title_(NULL),
fixed_width_font_change_page_button_(NULL),
diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc
index 7c54d5c..eb4675c 100644
--- a/chrome/browser/views/options/general_page_view.cc
+++ b/chrome/browser/views/options/general_page_view.cc
@@ -521,8 +521,7 @@ GeneralPageView::GeneralPageView(Profile* profile)
default_browser_group_(NULL),
default_browser_status_label_(NULL),
default_browser_use_as_default_button_(NULL),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- default_browser_worker_(new DefaultBrowserWorker(this))),
+ default_browser_worker_(new DefaultBrowserWorker(this)),
OptionsPageView(profile) {
}
diff --git a/chrome/browser/views/options/passwords_page_view.cc b/chrome/browser/views/options/passwords_page_view.cc
index 29ed27a..77c02ad 100644
--- a/chrome/browser/views/options/passwords_page_view.cc
+++ b/chrome/browser/views/options/passwords_page_view.cc
@@ -183,16 +183,14 @@ void PasswordsTableModel::CancelLoginsQuery() {
// PasswordsPageView, public
PasswordsPageView::PasswordsPageView(Profile* profile)
: OptionsPageView(profile),
- ALLOW_THIS_IN_INITIALIZER_LIST(show_button_(
+ show_button_(
this,
l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_SHOW_BUTTON),
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_HIDE_BUTTON))),
- ALLOW_THIS_IN_INITIALIZER_LIST(remove_button_(
- this,
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_REMOVE_BUTTON))),
- ALLOW_THIS_IN_INITIALIZER_LIST(remove_all_button_(
- this,
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_REMOVE_ALL_BUTTON))),
+ l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_HIDE_BUTTON)),
+ remove_button_(this, l10n_util::GetString(
+ IDS_PASSWORDS_PAGE_VIEW_REMOVE_BUTTON)),
+ remove_all_button_(this, l10n_util::GetString(
+ IDS_PASSWORDS_PAGE_VIEW_REMOVE_ALL_BUTTON)),
table_model_(profile),
table_view_(NULL) {
}
diff --git a/chrome/browser/views/page_info_window.cc b/chrome/browser/views/page_info_window.cc
index 8c9e6ad..3c045b7 100644
--- a/chrome/browser/views/page_info_window.cc
+++ b/chrome/browser/views/page_info_window.cc
@@ -7,10 +7,6 @@
#include <cryptuiapi.h>
#pragma comment(lib, "cryptui.lib")
-#include <atlbase.h>
-#include <atlapp.h>
-#include <atlmisc.h>
-
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "app/win_util.h"
diff --git a/chrome/browser/views/select_profile_dialog.cc b/chrome/browser/views/select_profile_dialog.cc
index faa4a04..ff9c0a3 100644
--- a/chrome/browser/views/select_profile_dialog.cc
+++ b/chrome/browser/views/select_profile_dialog.cc
@@ -33,7 +33,7 @@ void SelectProfileDialog::RunDialog() {
}
SelectProfileDialog::SelectProfileDialog()
- : ALLOW_THIS_IN_INITIALIZER_LIST(helper_(new GetProfilesHelper(this))) {
+ : helper_(new GetProfilesHelper(this)) {
// We first create an instance of the helper and then setup controls. This
// doesn't lead to race condition because once the helper is done with
// enumerating profiles by examining the file system, it posts a task on the
diff --git a/chrome/browser/views/tabs/tab.cc b/chrome/browser/views/tabs/tab.cc
index cb7504c..3975604 100644
--- a/chrome/browser/views/tabs/tab.cc
+++ b/chrome/browser/views/tabs/tab.cc
@@ -208,10 +208,10 @@ bool Tab::GetTooltipText(int x, int y, std::wstring* tooltip) {
return false;
}
-bool Tab::GetTooltipTextOrigin(int x, int y, gfx::Point* origin) {
+bool Tab::GetTooltipTextOrigin(int x, int y, CPoint* origin) {
ChromeFont font;
- origin->set_x(title_bounds().x() + 10);
- origin->set_y(-views::TooltipManager::GetTooltipHeight() - 4);
+ origin->x = title_bounds().x() + 10;
+ origin->y = -views::TooltipManager::GetTooltipHeight() - 4;
return true;
}
diff --git a/chrome/browser/views/tabs/tab.h b/chrome/browser/views/tabs/tab.h
index 920a849..ec295ed 100644
--- a/chrome/browser/views/tabs/tab.h
+++ b/chrome/browser/views/tabs/tab.h
@@ -101,7 +101,7 @@ class Tab : public TabRenderer,
virtual void OnMouseReleased(const views::MouseEvent& event,
bool canceled);
virtual bool GetTooltipText(int x, int y, std::wstring* tooltip);
- virtual bool GetTooltipTextOrigin(int x, int y, gfx::Point* origin);
+ virtual bool GetTooltipTextOrigin(int x, int y, CPoint* origin);
virtual std::string GetClassName() const { return kTabClassName; }
virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
virtual bool GetAccessibleName(std::wstring* name);
diff --git a/chrome/browser/views/tabs/tab_renderer.cc b/chrome/browser/views/tabs/tab_renderer.cc
index 96bdd918..e7b664b 100644
--- a/chrome/browser/views/tabs/tab_renderer.cc
+++ b/chrome/browser/views/tabs/tab_renderer.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/views/tabs/tab_renderer.h"
-
#include <limits>
+#include "chrome/browser/views/tabs/tab_renderer.h"
+
#include "app/gfx/chrome_canvas.h"
#include "app/gfx/chrome_font.h"
#include "app/l10n_util.h"
@@ -174,7 +174,7 @@ class TabRenderer::FavIconCrashAnimation : public Animation,
public AnimationDelegate {
public:
explicit FavIconCrashAnimation(TabRenderer* target)
- : ALLOW_THIS_IN_INITIALIZER_LIST(Animation(1000, 25, this)),
+ : Animation(1000, 25, this),
target_(target) {
}
virtual ~FavIconCrashAnimation() {}
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index 104cb34..333dcf4 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -582,7 +582,7 @@ gfx::Size BrowserToolbarView::GetPreferredSize() {
vertical_spacing);
}
-void BrowserToolbarView::RunPageMenu(const gfx::Point& pt, HWND hwnd) {
+void BrowserToolbarView::RunPageMenu(const CPoint& pt, HWND hwnd) {
Menu::AnchorPoint anchor = Menu::TOPRIGHT;
if (UILayoutIsRightToLeft())
anchor = Menu::TOPLEFT;
@@ -646,10 +646,10 @@ void BrowserToolbarView::RunPageMenu(const gfx::Point& pt, HWND hwnd) {
menu.AppendMenuItemWithLabel(IDC_REPORT_BUG,
l10n_util::GetString(IDS_REPORT_BUG));
- menu.RunMenuAt(pt.x(), pt.y());
+ menu.RunMenuAt(pt.x, pt.y);
}
-void BrowserToolbarView::RunAppMenu(const gfx::Point& pt, HWND hwnd) {
+void BrowserToolbarView::RunAppMenu(const CPoint& pt, HWND hwnd) {
Menu::AnchorPoint anchor = Menu::TOPRIGHT;
if (UILayoutIsRightToLeft())
anchor = Menu::TOPLEFT;
@@ -704,7 +704,7 @@ void BrowserToolbarView::RunAppMenu(const gfx::Point& pt, HWND hwnd) {
menu.AppendSeparator();
menu.AppendMenuItemWithLabel(IDC_EXIT, l10n_util::GetString(IDS_EXIT));
- menu.RunMenuAt(pt.x(), pt.y());
+ menu.RunMenuAt(pt.x, pt.y);
// Menu is going away, so set the profiles menu pointer to NULL.
profiles_menu_ = NULL;
@@ -718,7 +718,7 @@ bool BrowserToolbarView::IsItemChecked(int id) const {
return EncodingMenuControllerDelegate::IsItemChecked(id);
}
-void BrowserToolbarView::RunMenu(views::View* source, const gfx::Point& pt,
+void BrowserToolbarView::RunMenu(views::View* source, const CPoint& pt,
HWND hwnd) {
switch (source->GetID()) {
case VIEW_ID_PAGE_MENU:
diff --git a/chrome/browser/views/toolbar_view.h b/chrome/browser/views/toolbar_view.h
index ad373d4..b5f3861 100644
--- a/chrome/browser/views/toolbar_view.h
+++ b/chrome/browser/views/toolbar_view.h
@@ -72,7 +72,7 @@ class BrowserToolbarView : public views::View,
virtual bool GetAcceleratorInfo(int id, views::Accelerator* accel);
// views::MenuDelegate
- virtual void RunMenu(views::View* source, const gfx::Point& pt, HWND hwnd);
+ virtual void RunMenu(views::View* source, const CPoint& pt, HWND hwnd);
// GetProfilesHelper::Delegate method.
virtual void OnGetProfilesDone(const std::vector<std::wstring>& profiles);
@@ -157,10 +157,10 @@ class BrowserToolbarView : public views::View,
void SetSecurityLevel(ToolbarModel::SecurityLevel security_level);
// Show the page menu.
- void RunPageMenu(const gfx::Point& pt, HWND hwnd);
+ void RunPageMenu(const CPoint& pt, HWND hwnd);
// Show the app menu.
- void RunAppMenu(const gfx::Point& pt, HWND hwnd);
+ void RunAppMenu(const CPoint& pt, HWND hwnd);
// Overridden from View, to pass keyboard triggering of the right-click
// context menu on to the toolbar child view that currently has the
diff --git a/chrome/browser/views/user_data_dir_dialog.cc b/chrome/browser/views/user_data_dir_dialog.cc
index 70f9924..c6b17f3 100644
--- a/chrome/browser/views/user_data_dir_dialog.cc
+++ b/chrome/browser/views/user_data_dir_dialog.cc
@@ -22,8 +22,7 @@ std::wstring UserDataDirDialog::RunUserDataDirDialog(
}
UserDataDirDialog::UserDataDirDialog(const std::wstring& user_data_dir)
- : ALLOW_THIS_IN_INITIALIZER_LIST(
- select_file_dialog_(SelectFileDialog::Create(this))),
+ : select_file_dialog_(SelectFileDialog::Create(this)),
is_blocking_(true) {
std::wstring message_text = l10n_util::GetStringF(
IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY, user_data_dir);