Rename string16 to base::string16.
This commit is contained in:
parent
c713deb1e8
commit
e0e1d45859
10 changed files with 40 additions and 38 deletions
|
@ -111,7 +111,7 @@ bool Menu::IsItemForCommandIdDynamic(int command_id) const {
|
|||
command_id)->BooleanValue();
|
||||
}
|
||||
|
||||
string16 Menu::GetLabelForCommandId(int command_id) const {
|
||||
base::string16 Menu::GetLabelForCommandId(int command_id) const {
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
v8::Locker locker(isolate);
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
@ -121,12 +121,12 @@ string16 Menu::GetLabelForCommandId(int command_id) const {
|
|||
const_cast<Menu*>(this)->GetWrapper(isolate),
|
||||
"getLabelForCommandId",
|
||||
command_id);
|
||||
string16 label;
|
||||
base::string16 label;
|
||||
mate::ConvertFromV8(node_isolate, result, &label);
|
||||
return label;
|
||||
}
|
||||
|
||||
string16 Menu::GetSublabelForCommandId(int command_id) const {
|
||||
base::string16 Menu::GetSublabelForCommandId(int command_id) const {
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
v8::Locker locker(isolate);
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
@ -136,7 +136,7 @@ string16 Menu::GetSublabelForCommandId(int command_id) const {
|
|||
const_cast<Menu*>(this)->GetWrapper(isolate),
|
||||
"getSubLabelForCommandId",
|
||||
command_id);
|
||||
string16 label;
|
||||
base::string16 label;
|
||||
mate::ConvertFromV8(isolate, result, &label);
|
||||
return label;
|
||||
}
|
||||
|
|
|
@ -48,8 +48,8 @@ class Menu : public mate::Wrappable,
|
|||
int command_id,
|
||||
ui::Accelerator* accelerator) OVERRIDE;
|
||||
virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE;
|
||||
virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE;
|
||||
virtual string16 GetSublabelForCommandId(int command_id) const OVERRIDE;
|
||||
virtual base::string16 GetLabelForCommandId(int command_id) const OVERRIDE;
|
||||
virtual base::string16 GetSublabelForCommandId(int command_id) const OVERRIDE;
|
||||
virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
|
||||
virtual void MenuWillShow(ui::SimpleMenuModel* source) OVERRIDE;
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ GURL WebContents::GetURL() const {
|
|||
return web_contents()->GetURL();
|
||||
}
|
||||
|
||||
string16 WebContents::GetTitle() const {
|
||||
base::string16 WebContents::GetTitle() const {
|
||||
return web_contents()->GetTitle();
|
||||
}
|
||||
|
||||
|
@ -154,12 +154,12 @@ bool WebContents::IsCrashed() const {
|
|||
return web_contents()->IsCrashed();
|
||||
}
|
||||
|
||||
void WebContents::ExecuteJavaScript(const string16& code) {
|
||||
void WebContents::ExecuteJavaScript(const base::string16& code) {
|
||||
web_contents()->GetRenderViewHost()->ExecuteJavascriptInWebFrame(
|
||||
string16(), code);
|
||||
base::string16(), code);
|
||||
}
|
||||
|
||||
bool WebContents::SendIPCMessage(const string16& channel,
|
||||
bool WebContents::SendIPCMessage(const base::string16& channel,
|
||||
const base::ListValue& args) {
|
||||
return Send(new AtomViewMsg_Message(routing_id(), channel, args));
|
||||
}
|
||||
|
@ -190,13 +190,13 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder(
|
|||
.SetMethod("_send", &WebContents::SendIPCMessage);
|
||||
}
|
||||
|
||||
void WebContents::OnRendererMessage(const string16& channel,
|
||||
void WebContents::OnRendererMessage(const base::string16& channel,
|
||||
const base::ListValue& args) {
|
||||
// webContents.emit(channel, new Event(), args...);
|
||||
Emit(UTF16ToUTF8(channel), args, web_contents(), NULL);
|
||||
}
|
||||
|
||||
void WebContents::OnRendererMessageSync(const string16& channel,
|
||||
void WebContents::OnRendererMessageSync(const base::string16& channel,
|
||||
const base::ListValue& args,
|
||||
IPC::Message* message) {
|
||||
// webContents.emit(channel, new Event(sender, message), args...);
|
||||
|
|
|
@ -22,7 +22,7 @@ class WebContents : public mate::EventEmitter,
|
|||
bool IsAlive() const;
|
||||
void LoadURL(const GURL& url);
|
||||
GURL GetURL() const;
|
||||
string16 GetTitle() const;
|
||||
base::string16 GetTitle() const;
|
||||
bool IsLoading() const;
|
||||
bool IsWaitingForResponse() const;
|
||||
void Stop();
|
||||
|
@ -38,8 +38,9 @@ class WebContents : public mate::EventEmitter,
|
|||
int GetRoutingID() const;
|
||||
int GetProcessID() const;
|
||||
bool IsCrashed() const;
|
||||
void ExecuteJavaScript(const string16& code);
|
||||
bool SendIPCMessage(const string16& channel, const base::ListValue& args);
|
||||
void ExecuteJavaScript(const base::string16& code);
|
||||
bool SendIPCMessage(const base::string16& channel,
|
||||
const base::ListValue& args);
|
||||
|
||||
protected:
|
||||
explicit WebContents(content::WebContents* web_contents);
|
||||
|
@ -65,10 +66,11 @@ class WebContents : public mate::EventEmitter,
|
|||
|
||||
private:
|
||||
// Called when received a message from renderer.
|
||||
void OnRendererMessage(const string16& channel, const base::ListValue& args);
|
||||
void OnRendererMessage(const base::string16& channel,
|
||||
const base::ListValue& args);
|
||||
|
||||
// Called when received a synchronous message from renderer.
|
||||
void OnRendererMessageSync(const string16& channel,
|
||||
void OnRendererMessageSync(const base::string16& channel,
|
||||
const base::ListValue& args,
|
||||
IPC::Message* message);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ void Event::PreventDefault() {
|
|||
prevent_default_ = true;
|
||||
}
|
||||
|
||||
bool Event::SendReply(const string16& json) {
|
||||
bool Event::SendReply(const base::string16& json) {
|
||||
if (message_ == NULL || sender_ == NULL)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class Event : public Wrappable,
|
|||
void PreventDefault();
|
||||
|
||||
// event.sendReply(json), used for replying synchronous message.
|
||||
bool SendReply(const string16& json);
|
||||
bool SendReply(const base::string16& json);
|
||||
|
||||
// Whether event.preventDefault() is called.
|
||||
bool prevent_default() const { return prevent_default_; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue